1
0
Fork 0
salty-dog/test/harness.ts

23 lines
583 B
TypeScript
Raw Normal View History

2019-10-29 03:23:10 +00:00
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import sinonChai from 'sinon-chai';
2019-09-11 13:48:14 +00:00
import sourceMapSupport from 'source-map-support';
2019-08-30 05:24:12 +00:00
2019-10-29 03:23:10 +00:00
sourceMapSupport.install({
environment: 'node',
handleUncaughtExceptions: true,
hookRequire: true,
});
/**
* This will break the whole test run if any test leaks an unhandled rejection.
*/
process.on('unhandledRejection', (reason, promise) => {
// tslint:disable-next-line:no-console
console.error('unhandled error during tests', reason);
process.exit(1);
});
chai.use(chaiAsPromised);
chai.use(sinonChai);