-
-
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
Support require
and reporter-options
in mocharc
#4142
Comments
These should be working. Can you provide a sample repo or configuration? |
On The reporter options in If this could be an issue with |
This is also happening to me. https://github.com/CrowdStrike/faltest/blob/58ef39600c/packages/mocha/src/index.js#L55 My junit is printing to console instead of taking reporter options "output=dist/test_output.xml". The repro is to check out that repo, use commit 7857ec083be2867eec901d737954c3cc7d56201c (right before mocha 7). Then yarn install and run Then checkout d03d8fdd7e5467466f35c23f2f3936320e3f3f3e (mocha 7 commit), (remove old dist file), yarn install and run the command again. Notice it printing to console instead of file. |
After reverting mocha 7 and adding a regression test, this is now the failing PR if it helps. CrowdStrike/faltest#219 |
@kellyselden This has been a bug in v6. The |
instead of intuitive `reporterOptions` mochajs/mocha#4142 (comment)
instead of intuitive `reporterOptions` mochajs/mocha#4142 (comment)
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK. This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK. This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK. This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
In mochajs#4004 there was a change to use the documented `reporterOption` in favour of the setting that had always been used in practice called `reporterOptions`. This broke a lot of configurations that used the `reporterOptions`, which was the only way it every worked AFAIK. This changes the documentation to specify `reporterOptions` instead and ensure that any one that has switched to `reporterOption` after upgrade, still works.
@brettz9
|
Excellent, thank you, @juergba, I see this is working now. However, for require: [
'esm', 'chai/register-expect', 'test/bootstrap/node.js'
] |
Hmmm... Ok, I was left with: _mocha --require esm --require chai/register-expect --require test/bootstrap/node.js which after removing the requires, I just had: _mocha ...which was complaining about an unexpected idenifier, but it is ok with "mocha". |
So I guess this is resolved as far as I am concerned (though I'd be interesting in knowing why |
I would like to close this PR. |
THis worked for me In case of mocharc.json use
Thanks |
Is your feature request related to a problem or a nice-to-have?? Please describe.
I am not able to get
reporter-options
(orreporterOptions
) working with either_mocha
ormocha
when the config is withinmocha
onpackage.json
or in.mochrarc.js
require
is also not working either as an array or set of strings.But other properties are working.
Describe the solution you'd like
I'd like it to be possible to add
reporterOptions
andrequire
withinmocharc.js
.Describe alternatives you've considered
It seems unnecessarily clunky to add as flags to the CLI, especially when I've already added an RC file.
Additional context
The text was updated successfully, but these errors were encountered: