You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate Stryker into an Nx Angular project and in our Jest configuration, we have enabled the workerIdleMemoryLimit option to alleviate issues with Jest memory leaks. However, with this configuration enabled, it is causing Stryker to fail.
Loader Loading plugin @stryker-mutator/jest-runner
15:41:17 (36158) DEBUG ChildProcessProxyWorker Changing current working directory for this process to /.stryker-tmp/sandbox-WKv2IO
15:41:17 (36158) DEBUG jestTestAdapterFactory Detected Jest version 29.7.0
15:41:17 (36158) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
15:41:17 (36158) DEBUG CustomJestConfigLoader Read config from "my-lib/jest.config.ts" (used native `readInitialOptions` from jest-config).
15:41:17 (36158) DEBUG JestTestRunner Merging file-based config {
"displayName": "my-lib",
"preset": "../jest.preset.js",
"setupFilesAfterEnv": [
"<rootDir>/src/test-setup.ts"
],
"coverageDirectory": "../coverage/my-lib",
"transform": {
"^.+\\.(ts|mjs|js|html)$": [
"jest-preset-angular",
{
"tsconfig": "<rootDir>/tsconfig.spec.json",
"stringifyContentPathRegex": "\\.(html|svg)$"
}
]
},
"transformIgnorePatterns": [
"node_modules/(?!.*\\.mjs$)"
],
"snapshotSerializers": [
"jest-preset-angular/build/serializers/no-ng-attributes",
"jest-preset-angular/build/serializers/ng-snapshot",
"jest-preset-angular/build/serializers/html-comment"
],
"workerIdleMemoryLimit": 0.5,
"rootDir": "/Users/kenluu/Projects/demo/.stryker-tmp/sandbox-WKv2IO/my-lib"
}
with custom config {
"testEnvironment": "jsdom"
}
and default (internal) stryker config {
"collectCoverage": false,
"verbose": false,
"notify": false,
"bail": false,
"reporters": []
}
15:41:18 (36113) ERROR DryRunExecutor One or more tests resulted in an error:
Missing coverage results for:
* my-lib/src/lib/my-lib/my-lib.component.spec.ts
* my-lib/src/lib/random-file.spec.ts
You probably configured a test environment in jest that is not reporting code coverage to Stryker.
See also https://jestjs.io/docs/en/configuration.html#testenvironment-string
Are you using node, jsdom or jsdom-sixteen as a test environment? Please change that:
* node -> @stryker-mutator/jest-runner/jest-env/node
* jsdom -> @stryker-mutator/jest-runner/jest-env/jsdom
* jest-environment-jsdom-sixteen -> @stryker-mutator/jest-runner/jest-env/jsdom-sixteen
If you're using your own custom test environment, please enrich the environment with this mixin:
const { mixinJestEnvironment} = require('@stryker-mutator/jest-runner');
module.exports = mixinJestEnvironment(MyCustomTestEnvironment);
For more info, see https://stryker-mutator.io/docs/stryker-js/jest-runner#coverage-analysis
15:41:18 (36113) ERROR Stryker Unexpected error occurred while running Stryker Error: Something went wrong in the initial test run
at DryRunExecutor.validateResultCompleted (file:///path/node_modules/@stryker-mutator/core/dist/src/process/3-dry-run-executor.js:76:15)
at DryRunExecutor.executeDryRun (file:///path/node_modules/@stryker-mutator/core/dist/src/process/3-dry-run-executor.js:96:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async WorkItem.execute (file:///path/@stryker-mutator/core/dist/src/concurrent/pool.js:32:28)
at async file:///path/node_modules/@stryker-mutator/core/dist/src/concurrent/pool.js:69:13
15:41:18 (36113) INFO Stryker This might be a known problem with a solution documented in our troubleshooting guide.
15:41:18 (36113) INFO Stryker You can find it at https://stryker-mutator.io/docs/stryker-js/troubleshooting/
The text was updated successfully, but these errors were encountered:
Summary
I'm trying to integrate Stryker into an Nx Angular project and in our Jest configuration, we have enabled the
workerIdleMemoryLimit
option to alleviate issues with Jest memory leaks. However, with this configuration enabled, it is causing Stryker to fail.Stryker config
Test runner config
Stryker environment
Test runner environment
Your Environment
Add stryker.log
The text was updated successfully, but these errors were encountered: