1.0.1 • Published 4 years ago
mocha-it v1.0.1
Mocha-it
Replace it in mocha with asynchronous
Usage
import mochaIt from 'mocha-it';
// Run async function with 1 sec timeout
it('Run Basic', mochaIt(async (done) => {
done();
}));
// Run async function with 5 sec timeout
it('Timeout', mochaIt(async (done) => {
done();
}, 5000));
// When catch the error, this action stop immediately
it('Exception', mochaIt(async (done) => {
throw new Error('1 + 1 != 3');
}));
Support Git History
Credits
Based on these amazing projects:
- rhea by JeongHyeon Kim
License
MIT