README
uncaughtException
this module is used in mocha test.
it('should throw error xxx throws error', done => {
uncaughtException((err) => {
assert(err.message === 'xxx');
done();
});
xxx();
});
uncaughtException handle in mocha
<script type="module">
import uncaughtException from 'https://cdn.skypack.dev/uncaughtException';
</script>
this module is used in mocha test.
it('should throw error xxx throws error', done => {
uncaughtException((err) => {
assert(err.message === 'xxx');
done();
});
xxx();
});