Skip to content

馃悰 Bug: unexpected config properties have undefined behavior#6242

Description

@Vessel9817

Bug Report Checklist

If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!

Expected

Without tests:

Error: No test files found: "test"

With tests:

 1 passing (0ms)

Actual

Without tests:

Error: No test files found: "https://json.schemastore.org/mocharc.json"

With tests:

Warning: Cannot find any files matching pattern "https://json.schemastore.org/mocharc.json"
 1 passing (0ms)

Overall, the $schema property should be ignored, as it's purely for providing IDE hints. Furthermore, it would be wise to pass a warning for other properties the config parser isn't aware of, before ignoring them. For instance, deprecated properties which have been removed.

Minimal, Complete and Verifiable Example

Without tests: Vessel9817/mocha-mre-1
With tests: Vessel9817/mocha-mre-1#with-tests

Versions

> mocha --version
12.0.0-rc.6
> &"./node_modules/.bin/mocha" --version
12.0.0-rc.6
> node --version
v24.16.0
  • Environment: Node
  • Shell: PowerShell
  • Other modules: cross-env (optional, for using debug)

Additional Info

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions