https://github.com/featurist/unset-timeout
resets any setTimeout or setInterval between mocha tests
https://github.com/featurist/unset-timeout
Last synced: 7 months ago
JSON representation
resets any setTimeout or setInterval between mocha tests
- Host: GitHub
- URL: https://github.com/featurist/unset-timeout
- Owner: featurist
- Created: 2015-10-19T07:48:10.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-19T17:15:21.000Z (over 9 years ago)
- Last Synced: 2025-06-02T10:47:05.010Z (8 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 2
- Watchers: 10
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# unsetTimeout [](https://www.npmjs.com/package/unset-timeout) [](https://www.npmjs.com/package/unset-timeout) [](https://travis-ci.org/featurist/unset-timeout)
Your mocha tests use setTimeout or setInterval? Not sure how to get proper test isolation? Simply put this in your mocha test:
```js
require('unset-timeout');
```
unsetTimeout will reset all the `setTimeout` and `setInterval` calls after each mocha test, so you can be sure that one test doesn't bleed into another.