Socket
Socket
Sign inDemoInstall

assertion-error

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    assertion-error

Error constructor for test and validation frameworks that implements standardized AssertionError specification.


Version published
Maintainers
1
Install size
6.43 kB
Created

Package description

What is assertion-error?

The assertion-error package is used to create error objects that are specifically meant for testing assertions. It is commonly used in conjunction with assertion libraries to provide a more descriptive error message when an assertion fails. The error object created by assertion-error includes a message and can also include properties that describe the assertion that failed.

What are assertion-error's main functionalities?

Creating an AssertionError instance

This feature allows you to create an instance of an AssertionError with a custom message. This is useful when you want to throw a specific error in your tests when an assertion fails.

{"const AssertionError = require('assertion-error');
const error = new AssertionError('expected value to be true');
throw error;"}

Other packages similar to assertion-error

Readme

Source

AssertionError Build Status

Error constructor for test and validation frameworks that implements standardized AssertionError specification.

Installation

Node.js

assertion-error is available on npm.

$ npm install assertion-error

Component

assertion-error is available as a component.

$ component install chaijs/assertion-error

License

(The MIT License)

Copyright (c) 2013 Jake Luer jake@qualiancy.com (http://qualiancy.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 07 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc