1 |
|
2 |
|
3 | const chai = require('chai')
|
4 | const sinonChai = require('sinon-chai')
|
5 | const chaiAsPromised = require('chai-as-promised')
|
6 | const chaiShallowDeepEqual = require('chai-shallow-deep-equal')
|
7 |
|
8 | global.expect = chai.use(chaiShallowDeepEqual)
|
9 | .use(chaiAsPromised)
|
10 | .use(sinonChai)
|
11 | .expect
|
12 |
|
13 | process.on('unhandledRejection', function(reason, promise){
|
14 | console.log({ event: 'UnhandledPromiseRejection', promise, reason })
|
15 | process.exit(1)
|
16 | })
|