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.

After update to Nx 9.2.2, unit test are not executed

See original GitHub issue

Expected Behavior

After update executing unit tests works fine.

Current Behavior

After update unit tests are not being executed. I’m receiving message

No tests found, exiting with code 0

Interesting thing is that when I create application from scratch tests works fine. What I noticed is that changing testMach from

testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],

to

testMatch: ['**/+(*.)+(spec|test).[tj]s?(x)']

in jest.config.js file solves the problem.

Previous version of jest namely 24.9.0 works fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:7

github_iconTop GitHub Comments

2reactions
ubergeoffcommented, Oct 26, 2020

I upgraded a simple project from 8 to 10 - this issue seems to still be there…

Having this regex also fixes it: ['**/+(*.)+(spec|test).+(ts|js)?']

2reactions
maartentibaucommented, Jun 10, 2020

I can confirm this is currently still an issue.

I upgraded from an Angular version 8 project to version 9 using the nx migrate procedure. All goes fine, but the issue is indeed that the testMatch needs to be changed as stated above.

testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)']

to

testMatch: ['**/+(*.)+(spec|test).[tj]s?(x)']

I willing to investigate how to automate this in the migration if I can get some help from somebody from the nrwl team if possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cisco Nexus 9000 Series NX-OS Release Notes, Release 9.2(2)
This document describes the features, caveats, and limitations of Cisco NX-OS Release 9.2(2) software for use on the following switches:.
Read more >
Tests not running in Test Explorer - visual studio
However, the tests are not running when using the Visual Studio test explorer. The Test Explorer is showing all unit tests, but once...
Read more >
Chapter 9. Speeding up test execution - Effective Unit Testing
This chapter explains strategies for speeding up the execution of your test suite—the time it takes to run all of your unit tests—so...
Read more >
How to never build or test the same code twice - Nx Blog
Other developers working on the app will run some of the operations listed above after they pulled the latest master. And they will...
Read more >
9. Testing - Spring
True unit tests typically run extremely quickly, as there is no runtime infrastructure to ... Spring's integration testing support has the following goals:....
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