You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the --reporters option, it takes its argument and all following arguments up to the next option to be custom reports.
This differs from the documentation which suggests that you should repeat --reporters once for each reporter.
To Reproduce
$ yarn jest --reporters=default xyz
Error: Could not resolve a module for a custom reporter.
Module name: xyz
at /home/ubuntu/app/node_modules/jest-config/build/normalize.js:557:15
at Array.map (<anonymous>)
at normalizeReporters (/home/ubuntu/app/node_modules/jest-config/build/normalize.js:539:33)
at normalize (/home/ubuntu/app/node_modules/jest-config/build/normalize.js:632:5)
at readConfig (/home/ubuntu/app/node_modules/jest-config/build/index.js:224:68)
at async readConfigs (/home/ubuntu/app/node_modules/jest-config/build/index.js:404:26)
at async runCLI (/home/ubuntu/app/node_modules/@jest/core/build/cli/index.js:230:59)
at async Object.run (/home/ubuntu/app/node_modules/jest-cli/build/cli/index.js:163:37)
$ yarn jest --reporters=default --runInBand xyz
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/ubuntu/app
16908 files checked across 3 projects. Run with `--verbose` for more details.
Pattern: xyz - 0 matches
$ yarn jest --reporters=default xyz --runInBand xyz
Error: Could not resolve a module for a custom reporter.
Module name: xyz
at /home/ubuntu/app/node_modules/jest-config/build/normalize.js:557:15
at Array.map (<anonymous>)
at normalizeReporters (/home/ubuntu/app/node_modules/jest-config/build/normalize.js:539:33)
at normalize (/home/ubuntu/app/node_modules/jest-config/build/normalize.js:632:5)
at readConfig (/home/ubuntu/app/node_modules/jest-config/build/index.js:224:68)
at async readConfigs (/home/ubuntu/app/node_modules/jest-config/build/index.js:404:26)
at async runCLI (/home/ubuntu/app/node_modules/@jest/core/build/cli/index.js:230:59)
at async Object.run (/home/ubuntu/app/node_modules/jest-cli/build/cli/index.js:163:37)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Expected behavior
If I use --reporters=xxx yyy or --reporters xxx yyy it should only add xxx as a reporter and leave yyy as a leftover argument to jest.
envinfo
System:
OS: Linux 5.4 Linux Mint 19.3 (Tricia)
CPU: (6) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Binaries:
Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
Yarn: 1.19.0 - /usr/bin/yarn
npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
npmPackages:
jest: 26.1.0 => 26.1.0
Workaround
Ensure that --reporters has an option between it and any non-option command line arguments.
The text was updated successfully, but these errors were encountered:
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
#10191 馃悰 Bug Report
When using the
--reporters
option, it takes its argument and all following arguments up to the next option to be custom reports.This differs from the documentation which suggests that you should repeat
--reporters
once for each reporter.To Reproduce
Expected behavior
If I use
--reporters=xxx yyy
or--reporters xxx yyy
it should only addxxx
as a reporter and leaveyyy
as a leftover argument to jest.envinfo
Workaround
Ensure that
--reporters
has an option between it and any non-option command line arguments.The text was updated successfully, but these errors were encountered: