-
-
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
🐛 Bug: Configurations don't seem to support 'extends' for some settings #3916
Comments
I don't know wether it works or not. Let's suppose it works, then:
|
Thanks for the response @juergba!
I added a
I tried this too, but unsurprisingly still get the same error due to the ui config setting of |
The second test was planned in a different way. Just to see wether your config is found and read:
|
Just to confirm, does the below accurately reflect what you'd like me to try? .mocharc.yml ui: 'tdd'
extension: [ 'xx' ]
extends: './test/mocha-config.json' test/mocha-config.json {
"extension": [ "js" ]
} |
@calebcartwright yes, that would have been the test I had in mind. Thanks for your investigations. I did some tests and my conclusion is: in some edge cases it works, but in general it does not work.
|
Marking as |
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:
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 usingextends
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 theextends
keyword, all to no avail.I created a really simple repo here that reproduces this behavior:
ui
should be set totdd
via theextends
reference in the .mocharc.yml file, but running annpm test
results in a reference errorReferenceError: suite is not defined
leading me to believe thatextends
is not working since theui
is still set to the defaultbdd
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: