-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 Feature: Support granular configuration #3781
Comments
Are we planning to drop the word "simple" from project description? |
Came here looking for exactly this! Right now my team runs our tests on our locals via IntelliJ. If a test needs the Per-directory or even per-file (via filename matching) config files would be fantastic. |
For our team, being able to override the default configuration per directory, or better yet per file, would be fantastic. |
👍 for at least a per directory override, like it was possible with mocha.opts It could be done allowing
|
I kind of wish I had this for working with VSCode extensions for running Mocha tests (running specific tests via --grep is becoming my biggest hassle with Mocha, so extensions would be a lot more convenient for this. Though I guess I should try I do kind of wish the extensions would just let me configure my own command to launch mocha, since I'm running it via build tasks that ensure docker containers are running etc. That would be more ideal. But if nothing else, having per-directory mocha configs would make it more likely I could use one of those VSCode extensions. |
Did anyone find a way to do this with the project as-is? I have a project that runs with something like:
Similar to a comment above, this means I can't just tell people to run a test. We have a script as a workaround, but with integrating with something like Intellij, that doesn't seem possible. Would be great if there was a way to do it, or if anyone had any tricks on how they've been doing it. |
Per #5027, we're trying to avoid big shakeups. This would be a pretty big one. Amusingly, even ESLint is moving away from nested configurations! https://eslint.org/blog/2022/08/new-config-system-part-2/ Thanks for the discussion all! Closing as wontfix. 🤎 |
Mocha v6 now has configuration file support.
Originally, I had hoped this system could work more like ESLint's, where e.g.,
.mocharc.json
files could exist in multiple directories and affect only the test files at, and "below", this directory level.Given that we can't get this behavior for free (there's overhead and complexity involved), do people think it's useful? Do people use this in ESLint?
A counter-example is Mocha's own
.eslintrc.yml
, which uses theoverrides
property to change ESLint's behavior on a per-file or per-directory basis. This is another way of expressing the same thing as multiple ESLint config files, except using only a single config.At minimum, greater control over which test files use which config settings would be a positive. Mocha's own tests could leverage such a feature. Maybe all we need to do is support something like
overrides
for now...?The text was updated successfully, but these errors were encountered: