Skip to content

Docs: Update the 'require' and 'exports' interfaces usage guides #5564

@dynst

Description

@dynst

#5357 seems to be moving towards an ESM-first Mocha 12+. Should the require and exports interfaces be removed, renamed, or have their documentation updated to demonstrate how to use them with ESM syntax?

module.exports = {
before: function () {
// ...
},

The `require` interface cannot be run via the `node` executable, and must be run via `mocha`.
:::
```js
var testCase = require("mocha").describe;

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: documentationanything involving docs or mochajs.orgcore-teamissues which must be handled by Mocha's core team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions