question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jest-runner started adding `-c '/home/Dev/monitoring/projects/main-frame/package.json'`

See original GitHub issue

Recently while running the test jest-runners adds additional argument to the command:

`-c '/home/Dev/monitoring/projects/main-frame/package.json'`

which causes the error. I am using monorepo with lerna and yarn workspaces. main-frame is one of the projects.

Up to this date, everything was working fine. The only required change was to jestCommand:

    "jestrunner.jestCommand": "yarn test:main-frame -- --",

This command is starting the tests in proper project.

Now I get:

yarn test:main-frame -- -- '/home/Dev/monitoring/projects/main-frame/src/features/__tests__/SampleTest.test.tsx' -c '/home/Dev/monitoring/projects/main-frame/package.json' -t 'Test name'

instead of:

yarn test:main-frame -- -- '/home/Dev/monitoring/projects/main-frame/src/features/__tests__/SampleTest.test.tsx' -t 'Test name'

How to remove this:

-c '/home/Dev/monitoring/projects/main-frame/package.json'

from the generated command?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
firsttriscommented, Sep 22, 2022

reverted this MR

1reaction
firsttriscommented, Sep 22, 2022

hey @karlosos

are you sure you are on the latest version, there have been multiple MR that inroduced this feature, the first didnt work.

im also tested it in a yarn workspaces mono repo, and it dont get the -c ‘path…’

can you verify ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

firsttris/vscode-jest-runner: Simple way to run or debug a ...
vscode-jest-runner is focused on running or debugging a specific test or ... Open Keyboard Shortcuts (JSON) the json config file will open add...
Read more >
Test runner with Nodejs and Jest not working with 17.1
Parsing 'c:\dev\NodejsConsoleApp1\NodejsConsoleApp1\package.json'. ... It hangs if the framework adapter returns without posting a “test start” message.
Read more >
Using Visual Studio Code to debug Jest based unit tests
Step 2 Configuring jest test debugging single run. Let's replace the default config file created by VS Code and place the following one:...
Read more >
Jest Runner
The @stryker-mutator/jest-runner is a plugin for Stryker to enable Jest as a test runner. As such, you should make sure you have the...
Read more >
Jest | JetBrains Rider Documentation
Learn more from Getting Started and Configuring Jest on the Jest ... If the field is empty, JetBrains Rider looks for a package.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found