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.

notifyMode is ignored when used at jest.config.js

See original GitHub issue

šŸ› Bug Report

The notifyMode is ignored when specified at jest.config.js, but not when used via CLI. Tested on MacOS Mojave 10.14.5.

To Reproduce

Steps to reproduce the behavior:

// jest.config.js
module.exports = {
  notify: true,
  notifyMode: "failure"
};
// index.test.js
test("ok", () => {
  expect(true).toBe(true);
});

Run jest.

If you run it with jest --notifyMode=failure it will work. (It doesnā€™t show the notify window)

Screen Shot 2019-08-14 at 17 45 24

Expected behavior

Not to show the notify window when notifyMode is failure and all tests pass.

Link to repl or repo (highly encouraged)

Not able to reproduce on repl.it demo.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jeysalcommented, Aug 15, 2019

Yeah Iā€™d say just do not specify yargs defaults, but jest-config Defaults.ts, I think thatā€™s what already happens for most things that can be arg and config.

0reactions
github-actions[bot]commented, Jun 16, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
Use the <rootDir> string token to include the path to your project's root directory to prevent it from accidentally ignoring all of your...
Read more >
jest.config is being ignored - Stack Overflow
Seems like adding -- --config=jest.config.js is enough. You can try to replace the scripts "test" in package.json by react-scripts testĀ ...
Read more >
jest.config.js Ā· pillar
notifyMode : "always",. // A preset that is used as a base for Jest's configuration. // preset: null,. // Run tests from one...
Read more >
Configuring package.json Ā· Jest
If you'd like to use your package.json to store Jest's config, the "jest" key ... it from accidentally ignoring all of your files...
Read more >
always No files found with or without jest.config.js before ...
custom options --runTestsByPath unit-test/**.js of cli. try it, success macBook-2:~/code/jest-demo (master) chris$ npm run testĀ ...
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