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
24 changes: 24 additions & 0 deletions mocha.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import "./mocha.js"

const { mocha } = globalThis;

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

const setup = mocha.setup.bind(mocha);
const run = mocha.run.bind(mocha);

export {
describe, context, it, specify, xdescribe, xcontext,
xit, xspecify, before, beforeEach, afterEach, after, setup, run
};
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