Merge pull request #15152 from backstage/rugvip/coverage-config

cli: fix coverage configuration and make next tests the new default
This commit is contained in:
Patrik Oldsberg
2022-12-10 15:16:47 +01:00
committed by GitHub
7 changed files with 34 additions and 83 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Updated Jest coverage configuration to only apply either in the root project or package configuration, depending on whether repo or package tests are run.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/cli': minor
---
The Jest configuration that was previously enabled with `BACKSTAGE_NEXT_TESTS` is now enabled by default. To revert to the old configuration you can now instead set `BACKSTAGE_OLD_TESTS`.
This new configuration uses the `babel` coverage provider rather than `v8`. It used to be that `v8` worked better when using Sucrase for transpilation, but now that we have switched to SWC, `babel` seems to work better. In addition, the new configuration also enables source maps by default, as they no longer have a negative impact on code coverage accuracy, and it also enables a modified Jest runtime with additional caching of script objects.