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.

Unable to test via GitHub Actions due to jest --watch move

See original GitHub issue

Current Behavior

We get the following error when trying to run the tests on CI:

No tests found related to files changed since the last commit. 
Screen Shot 2019-12-19 at 5 52 34 PM

However, it passes locally:

Screen Shot 2019-12-19 at 6 01 17 PM

Both are being run via docker.

Test with fresh npx tsdx create lib:

Using tsdx v0.12.0

GitHub Actions: Screen Shot 2019-12-21 at 10 54 52 AM

Expected behavior

For yarn test -> tsdx test to run without fail over CI/CD.

Suggested solution(s)

Allow for us to leverage the default jest config but without the watch flag.

Your environment

Software Version(s)
TSDX 0.11.0
TypeScript 3.7.3
Browser -
npm/Yarn 1.21.1
Node 10.16.0
Operating System docker via ubuntu-18.04

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
sw-yxcommented, Dec 21, 2019

can you set environment variable CI=true?

0reactions
sw-yxcommented, Jan 9, 2020

heads up - we have decided to undo this move. will not run in watch mode by default. sorry for the flipflop. https://github.com/jaredpalmer/tsdx/issues/408

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tests fail to run in watch mode · Issue #8534 · facebook/jest
My tests run just fine when using the jest command. However, as soon as I run jest --watch I get the following error....
Read more >
Moving src files doesn't bust the Jest cache #3705 - GitHub
Moving a source file doesn't seem to bust the Jest cache. This causes the default coverage reporter to report missing coverage on the...
Read more >
JEST tests complete successfully but returns exit status 1 #9324
Tests fail on the CI due to a single worker process (in GitHub Actions in my case) which is not the case in...
Read more >
Tests are failing when running with plugin but working fine ...
FAIL src/index.test.js ○ Test suite failed to run Jest encountered an unexpected token This usually means that you are trying to import a...
Read more >
Jest tests failing on Github Action but pass locally · Issue #11430
I investigated into why this would happen and realized that it could possibly be due to the "low-resources" available on the machine running...
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