diff --git a/test/mocha.setup.js b/test/mocha.setup.js index 7bc1808..f939311 100644 --- a/test/mocha.setup.js +++ b/test/mocha.setup.js @@ -6,7 +6,7 @@ process.on('unhandledRejection', (e) => { // enable the should interface with sinon // and load chai-as-promised and sinon-chai by default const sinonChai = require('sinon-chai'); -const chaiAsPromised = require('chai-as-promised'); +const chaiAsPromised = (...args) => import('chai-as-promised').then(({default: chaiAsPromised}) => chaiAsPromised(...args)); const { should, use } = require('chai'); should();