testable-error
v1.0.0
Published
Create testable javascript errors
Downloads
40
Readme
testable-error
Create testable javascript errors
Install
Install with npm
$ npm i testable-error --save-dev
Usage
const createTestableErrorClass = require('testable-error');
const MySimpleError = createTestableErrorClass('MySimpleError')
expect(function(){
throw new MySimpleError('oh no!')
}).to.throw(MySimpleError)
// ✔ ok
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
License
Copyright © 2016 Licensed under the MIT license.
This file was generated by readme-generator on November 02, 2016.