After update to Nx 9.2.2, unit test are not executed
See original GitHub issueExpected 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:
- Created 3 years ago
- Reactions:8
- Comments:7
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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)?']
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.