Add support for multiple jest runners in one project
See original GitHub issueSuppose having different jest configs for unit and e2e tests. Whenever running tests in majestic GUI majestic config in package.json
has to be changed.
How about switching from:
"majestic": {
"jestScriptPath": "./node_modules/jest/bin/jest.js",
"args": ["--config=./config/jest/e2e.json"]
}
to something like this:
"majestic": {
"jestScriptPath": "./node_modules/jest/bin/jest.js",
"runners": {
"unit": ["--config=./config/jest/unit.json"],
"e2e": ["--config=./config/jest/e2e.json"]
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Jest 20: Delightful Testing & Multi-Project-Runner
We made a number of additions and improvements to the testing APIs which will help write more effective tests. We'd like to point...
Read more >Support maxWorkers or runInBand when using 'projects' #10936
Setup a mono-repo with two jest config files; Set one to maxWorkers: 1; Add both config paths to base projects property; Run jest...
Read more >How do you setup multiple jest configs within a single project?
The solution I found was to pass a flag into the config. module. exports = () => { // only collect cover if...
Read more >2 Methods for Running Multiple Jest Suites in the Same Project
Why Run Multiple Test Suites Separately · The Scenario · Method #1: CLI Arguments · Method #2: Dynamic Configuration with Environment Variables ·...
Read more >vscode-jest-runner - Visual Studio Marketplace
Extension for Visual Studio Code - Simple way to run or debug a single (or multiple) tests from context-menu.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s exactly what I meant
How about having named configs like below
and then when starting Majestic you could pass a flag like
--config=unit
?