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.

Test Runner flicker error

See original GitHub issue

Can you reproduce the problem with latest npm?

Yes

Description

Sometimes running yarn test or npm test causes the tests to run over and over again.

Expected behavior

The test runner should report on the last test run. The runner should not run the tests again until the source has been modified.

Actual behavior

The Tests run over and over again…

actual behavior

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.7
  2. node -v: v8.1.0
  3. npm -v: 5.0.3
  4. yarn -v: v0.24.5

Then, specify:

  1. Operating system: OSX
  2. Browser and version: Terminal

Reproducible Demo

This issue occures after creating a new project and running the tests. I’ve been able to reproduce it several times… however, sometimes it does not happen and works as expected.

  1. create-react-app <appname>
  2. cd <appname>
  3. yarn test

Sometimes this error happens, other times the test runner runs the test and waits until the source has been modified as expected. I am not exactly sure why?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidUvcommented, Aug 31, 2018

Dropbox also causes this behavior when syncing files from the folder where the app is. It is most noticeable with a newly created app since dropbox has a lot of files to sync (node_modules…). You can:

  • Wait for it to finish syncing
  • Pause dropbox syncing
  • Exclude folder from dropbox syncing (whole app folder or just node_modules)
0reactions
graemetmcdonoughcommented, Jul 19, 2018

Seems as though the iCloud backups trigger the tests; as soon as anything happens to the files (namely backing up), the test are rerun by watchman.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test runner does not run tests and test command buttons flicker ...
The tests did not run. Instead the an exception in Rider was shown, which I reported as DEXP-551712. The test command buttons are...
Read more >
How to Avoid Flickering/Flashes in A/B Tests | BrillMark
Follow these steps to avoid and eliminate page flickering and flashing of original content in A/b test or experiments.
Read more >
How to deal with blinking tests | Serhii Kalinets : Blog
The first step of troubleshooting is reproducing. We basically need to observe falling test, check it's variables and figure out what's is going ......
Read more >
How to Avoid Flickering (Flash of Original Content) in A/B Tests
Flickering is caused by the basic client-side operation of A/B testing solutions that apply a JavaScript overlayer during page loading to ensure ...
Read more >
Flickering Test Failures and End-to-End Tests - CMCrossroads
In "Growing Object Oriented Software Guided By Tests", Steve Freeman and Nat Pryce talk about the dangers of tests that occasionally fail, ...
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