1.0.1 • Published 4 years ago

mocha-it v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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:

License

MIT

1.0.1

4 years ago

1.0.0

4 years ago