0.1.0 • Published 7 years ago
expect-error v0.1.0
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
0.1.0
7 years ago