@neutrinojs/jest does not support some coverage options from .neutrinorc.js #1015
Comments
Hi! To generate coverage reports when using the Neutrino 8 Jest preset, the There should be no changes required to the Jest configuration in Could you try that and report back with how it went? :-) |
Looking at the Jest docs, using With Neutrino 9 (on |
Hi @edmorley, maybe using Take the snippet I provided above for example. I have set two options that I would like to be passed on to jest ( If I run the |
The options passed to the preset are merged using deepmerge, here: neutrino/packages/jest/src/index.js Lines 56 to 76 in f741f9e
This does mean that for array based values, the arrays will be merged, rather than be replaced. As such at present, you'll end up with both the old and new value in the The Neutrino 8 Jest preset writes the configuration to a temporary file (a bit hacky and has been rewritten for Neutrino 9 on Also, the default value for |
I guess the merge is the undesirable operation in my case. Is this something that will be overridable in future versions? |
In v9 you'll be able to overwrite the value from the const neutrino = require('neutrino');
module.exports = {
...neutrino().jest(),
collectCoverageFrom: /* whatever you overwrite */
}; |
That sounds great! A worthwhile option in my opinion. I'll wait for v9 to drop. |
Closing as resolved. |
Bug
Please try to answer the following questions:
What version of Neutrino are you using?
8.3.0
Are you trying to use any presets? If so, which ones, and what versions?
Yes:
@neutrinojs/airbnb 8.3.0
@neutrinojs/jest 8.3.0
@neutrinojs/react-components 8.3.0
Are you using the Yarn client or the npm client? What version?
Yarn v1.9.4
What version of Node.js are you using?
Node v8.9.3
What operating system are you using?
MacOS 10.13.4
What did you do?
Added coverage options to the jest preset via
.neutrinorc.js
like so:Coverage reports to be generated.
No coverage was run.
The text was updated successfully, but these errors were encountered: