expect-error
v0.1.0
Published
Throws an error if no error is thrown and vice versa.
Downloads
1
Readme
js-expect-error
Throws an error if no error was thrown and vice versa.
Usage
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