0.1.0 • Published 7 years ago

expect-error v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

js-expect-error

Throws an error if no error was thrown and vice versa.

Usage

  1. npm install expect-error
const expectError = require('expect-error');

expectError(() => {
    return 'foo';
}); // This will throw an error.

expectError(() => {
    throw new Error('foo');
}); // This will not throw an error.

Testing

npm test
0.1.0

7 years ago