1
0
Fork 0
js-yaml-schema/test/harness.ts

23 lines
584 B
TypeScript
Raw Normal View History

2019-11-13 14:01:51 +00:00
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import sinonChai from 'sinon-chai';
import sourceMapSupport from 'source-map-support';
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) => {
2019-11-13 14:01:51 +00:00
// eslint-disable-next-line no-console
console.error('unhandled error during tests', reason);
process.exit(1);
});
chai.use(chaiAsPromised);
chai.use(sinonChai);