Skip to content

🐛 Bug: Configurations don't seem to support 'extends' #3916

Open

Description

Opening this as a question as I'm not yet sure whether it's a bug or a user error 😄

The docs on extending configuration state:

Configurations can inherit from other modules using the extends keyword

However, I've been unable to get this to work and I haven't been able to find any Mocha-specific examples leveraging extends. I've tried using extends both with a relative path to a json file, as well as with a module as referenced in the yargs docs linked from the Mocha docs, and I also tried the various Mocha config file formats (js, yaml, json, etc.) to define the Mocha config with the extends keyword, all to no avail.

I created a really simple repo here that reproduces this behavior:

ui should be set to tdd via the extends reference in the .mocharc.yml file, but running an npm test results in a reference error ReferenceError: suite is not defined leading me to believe that extends is not working since the ui is still set to the default bdd

Any help would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    semver-majorimplementation requires increase of "major" version number; "breaking changes"status: accepting prsMocha can use your help with this one!type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions