Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = [
},
},
{
files: ["test/**/*.mjs"],
files: ["**/*.mjs"],
languageOptions: {
sourceType: "module",
},
Expand Down
36 changes: 36 additions & 0 deletions mocha.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// this built file is not committed to the repo
/* eslint-disable-next-line n/no-missing-import */
import "./mocha.js";

const { mocha } = globalThis;
const after = mocha.after.bind(mocha);
const afterEach = mocha.afterEach.bind(mocha);
const before = mocha.before.bind(mocha);
const beforeEach = mocha.beforeEach.bind(mocha);
const context = mocha.context.bind(mocha);
const describe = mocha.describe.bind(mocha);
const it = mocha.it.bind(mocha);
const run = mocha.run.bind(mocha);
const setup = mocha.setup.bind(mocha);
const specify = mocha.specify.bind(mocha);
const xcontext = mocha.xcontext.bind(mocha);
const xdescribe = mocha.xdescribe.bind(mocha);
const xit = mocha.xit.bind(mocha);
const xspecify = mocha.xspecify.bind(mocha);

export {
after,
afterEach,
before,
beforeEach,
context,
describe,
it,
run,
setup,
specify,
xcontext,
xdescribe,
xit,
xspecify,
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"mocha.css",
"mocha.js",
"mocha.js.map",
"mocha.mjs",
"browser-entry.js"
],
"browser": {
Expand Down