Skip to content

Commit

Permalink
fixed mocha-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Weber committed Jan 4, 2025
1 parent 40cca53 commit f5a02c5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/mocha.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ 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 { should, use } = require("chai");
(async () => {
const sinonChai = await import("sinon-chai");
const chaiAsPromised = await import("chai-as-promised");
const { should, use } = await import("chai");

should();
use(sinonChai);
use(chaiAsPromised);
should();
use(sinonChai.default);
use(chaiAsPromised.default);
})();

0 comments on commit f5a02c5

Please sign in to comment.