Skip to content

Commit

Permalink
set chai-as-promised to dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
Smart-Gang committed Sep 30, 2024
1 parent 55af2eb commit 6a9fb99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/mocha.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6a9fb99

Please sign in to comment.