Summary
When setting a custom rootDir (i.e. src) in the jest.config.js, Stryker seems to override it with the sandbox root path (ignoring the value from jest.config.js). This causes files not be found (because the src/ prefix is missing).
Module tests/setup.ts in the setupFiles option was not found.
<rootDir> is: [...]/.stryker-tmp/sandbox3026627 // <- should have been [...]/.stryker-tmp/sandbox3026627/src
Stryker config
module.exports = function (config) {
config.set({
mutate: ['src/**/*.ts', '!src/**/*.spec.ts'],
mutator: 'vue',
testRunner: 'jest',
reporters: ['progress', 'clear-text', 'html'],
coverageAnalysis: 'off'
});
};
Test runner config
jest.config.js:
module.exports = {
globals: {
'ts-jest': {
babelConfig: false,
tsConfig: {target: 'es2017'},
diagnostics: { pathRegex: '/\.(spec|test)\.ts$/' }
},
},
rootDir: 'src',
testMatch: [
'**/__tests__/**/*.ts?(x)',
'**/?(*.)spec.ts?(x)'
],
setupFiles: ['tests/setup.ts'],
setupFilesAfterEnv: ['tests/setupScript.ts'],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'vue'
],
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.tsx?$': 'ts-jest',
'.+\\.(css|styl|less|sass|scss)$': 'jest-transform-stub',
},
};
Stryker environment
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/[email protected]
โโ @stryker-mutator/[email protected]
โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/api@^2.1.0
โ โโ @stryker-mutator/util@^2.1.0
โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/api@^2.1.0
โ โโ @stryker-mutator/util@^2.1.0
โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/api@^2.1.0
โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/api@^2.1.0
โ โโ @stryker-mutator/util@^2.1.0
โโ @stryker-mutator/[email protected]
โโ @stryker-mutator/[email protected]
โ โโ @stryker-mutator/api@^2.1.0
โโ @jest/[email protected]
โ โโ @jest/source-map@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/console@^24.7.1
โ โโ @jest/reporters@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/transform@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-changed-files@^24.9.0
โ โโ jest-config@^24.9.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-regex-util@^24.3.0
โ โโ jest-resolve-dependencies@^24.9.0
โ โโ jest-resolve@^24.9.0
โ โโ jest-runner@^24.9.0
โ โโ jest-runtime@^24.9.0
โ โโ jest-snapshot@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-validate@^24.9.0
โ โโ jest-watcher@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/fake-timers@^24.9.0
โ โโ @jest/transform@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-mock@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-mock@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/environment@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/transform@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-resolve@^24.9.0
โ โโ jest-runtime@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-worker@^24.6.0
โโ @jest/[email protected]
โโ @jest/[email protected]
โ โโ @jest/console@^24.9.0
โ โโ @jest/types@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/test-result@^24.9.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-runner@^24.9.0
โ โโ jest-runtime@^24.9.0
โโ @jest/[email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-regex-util@^24.9.0
โ โโ jest-util@^24.9.0
โโ @jest/[email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @types/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ @stryker-mutator/[email protected]
โ โโ @types/[email protected]
โ โโ @vue/[email protected]
โ โ โโ @types/jest@^24.0.18
โ โ โโ @types/[email protected]
โ โ โ โโ @types/jest-diff@*
โ โ โโ babel-jest@^24.9.0
โ โ โโ jest-environment-jsdom-fifteen@^1.0.0
โ โ โโ jest-serializer-vue@^2.0.2
โ โ โโ jest-transform-stub@^2.0.0
โ โ โโ jest-watch-typeahead@^0.4.0
โ โ โโ jest@^24.9.0
โ โ โโ ts-jest@^24.1.0
โ โ โโ vue-jest@^3.0.5
โ โโ @vue/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ @types/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ @types/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ @types/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โ โโ @types/[email protected]
โ โโ [email protected]
โ โโ [email protected]
โโ @stryker-mutator/[email protected]
โโ @types/[email protected]
โโ @types/[email protected]
โ โโ @types/jest-diff@*
โโ [email protected]
โ โโ @jest/transform@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ babel-preset-jest@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ babel-plugin-jest-hoist@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-get-type@^24.9.0
โ โโ jest-matcher-utils@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-regex-util@^24.9.0
โโ [email protected]
โ โโ @jest/types@^24.9.0
โโ [email protected]
โ โโ @jest/core@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-config@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-validate@^24.9.0
โโ [email protected]
โ โโ @jest/test-sequencer@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ babel-jest@^24.9.0
โ โโ jest-environment-jsdom@^24.9.0
โ โโ jest-environment-node@^24.9.0
โ โโ jest-get-type@^24.9.0
โ โโ jest-jasmine2@^24.9.0
โ โโ jest-regex-util@^24.3.0
โ โโ jest-resolve@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-validate@^24.9.0
โโ [email protected]
โ โโ jest-get-type@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-get-type@^24.9.0
โ โโ jest-util@^24.9.0
โโ [email protected]
โ โโ @jest/environment@^24.3.0
โ โโ @jest/fake-timers@^24.3.0
โ โโ @jest/types@^24.3.0
โ โโ jest-mock@^24.0.0
โ โโ jest-util@^24.0.0
โโ [email protected]
โ โโ jest-mock@^24.5.0
โ โโ jest-util@^24.5.0
โโ [email protected]
โ โโ @jest/environment@^24.9.0
โ โโ @jest/fake-timers@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-mock@^24.9.0
โ โโ jest-util@^24.9.0
โโ [email protected]
โ โโ @jest/environment@^24.9.0
โ โโ @jest/fake-timers@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-mock@^24.9.0
โ โโ jest-util@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-serializer@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-worker@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ @jest/environment@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-each@^24.9.0
โ โโ jest-matcher-utils@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-runtime@^24.9.0
โ โโ jest-snapshot@^24.9.0
โ โโ jest-util@^24.9.0
โโ [email protected]
โ โโ jest-get-type@^24.9.0
โโ [email protected]
โ โโ jest-diff@^24.9.0
โ โโ jest-get-type@^24.9.0
โโ [email protected]
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โโ [email protected]
โ โโ @jest/types@^24.9.0
โโ [email protected]
โโ [email protected]
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-regex-util@^24.3.0
โ โโ jest-snapshot@^24.9.0
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-pnp-resolver@^1.2.1
โโ [email protected]
โ โโ @jest/console@^24.7.1
โ โโ @jest/environment@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-config@^24.9.0
โ โโ jest-docblock@^24.3.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-jasmine2@^24.9.0
โ โโ jest-leak-detector@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-resolve@^24.9.0
โ โโ jest-runtime@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-worker@^24.6.0
โโ [email protected]
โ โโ @jest/console@^24.7.1
โ โโ @jest/environment@^24.9.0
โ โโ @jest/source-map@^24.3.0
โ โโ @jest/transform@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-config@^24.9.0
โ โโ jest-haste-map@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-mock@^24.9.0
โ โโ jest-regex-util@^24.3.0
โ โโ jest-resolve@^24.9.0
โ โโ jest-snapshot@^24.9.0
โ โโ jest-util@^24.9.0
โ โโ jest-validate@^24.9.0
โโ [email protected]
โโ [email protected]
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-diff@^24.9.0
โ โโ jest-get-type@^24.9.0
โ โโ jest-matcher-utils@^24.9.0
โ โโ jest-message-util@^24.9.0
โ โโ jest-resolve@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ @jest/console@^24.9.0
โ โโ @jest/fake-timers@^24.9.0
โ โโ @jest/source-map@^24.9.0
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โโ [email protected]
โ โโ @jest/types@^24.9.0
โ โโ jest-get-type@^24.9.0
โโ [email protected]
โ โโ jest-watcher@^24.3.0
โโ [email protected]
โ โโ @jest/test-result@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-util@^24.9.0
โโ [email protected]
โโ [email protected]
โ โโ jest-cli@^24.9.0
โ โโ @jest/types@^24.9.0
โ โโ jest-worker@^24.9.0
โโ [email protected]
โโ [email protected]
Test runner environment
# stryker run
Your Environment
| software | version(s)
| ---------------- | -------
| node | v10.17.0
| yarn | 1.19.1
| Operating System | Linux
Add stryker.log
11:51:23 (30867) INFO ConfigReader Using stryker.conf.js in the current working directory.
11:51:23 (30867) DEBUG BroadcastReporter Broadcasting to reporters ["progress","clear-text","html"]
11:51:23 (30867) DEBUG ConfigReader Loading config stryker.conf.js
11:51:23 (30867) DEBUG PluginLoader Loading @stryker-mutator/* from /tmp/stryker-test/node_modules/@stryker-mutator
11:51:23 (30867) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/html-reporter" (matched with expression @stryker-mutator/*)
11:51:23 (30867) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/jest-runner" (matched with expression @stryker-mutator/*)
11:51:23 (30867) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/typescript" (matched with expression @stryker-mutator/*)
11:51:23 (30867) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator" (matched with expression @stryker-mutator/*)
11:51:23 (30867) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/html-reporter
11:51:23 (30867) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/jest-runner
11:51:23 (30867) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/typescript
11:51:23 (30867) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator
11:51:23 (30867) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/core/src/reporters/index.js
11:51:23 (30867) DEBUG TypescriptConfigEditor No 'tsconfigFile' specified, not loading any config
11:51:23 (30867) INFO InputFileResolver Found 40 of 1533 file(s) to be mutated.
11:51:23 (30867) DEBUG InputFileResolver All input files: [
{ ... }
]
11:51:23 (30867) DEBUG InputFileResolver Files to mutate: [
{ ... }
"/tmp/stryker-test/frontend/src/components/Test.ts"
]
11:51:23 (30867) DEBUG TemporaryDirectory Using temp directory "/tmp/stryker-test/frontend/.stryker-tmp"
11:51:23 (30867) DEBUG TestFrameworkOrchestrator The `coverageAnalysis` setting is "off", not hooking into the test framework to achieve performance benefits.
11:51:23 (30867) INFO InitialTestExecutor Starting initial test run. This may take a while.
11:51:23 (30867) DEBUG Sandbox Creating a sandbox for files in /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:23 (30867) DEBUG Sandbox Creating test runner 0
11:51:23 (30867) DEBUG ChildProcessProxy Starting /tmp/stryker-test/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js in child process 30889
11:51:24 (30867) DEBUG TimeoutDecorator Starting timeout timer (300000 ms) for a test run
11:51:24 (30889) DEBUG ChildProcessProxyWorker Changing current working directory for this process to /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:24 (30889) DEBUG PluginLoader Loading @stryker-mutator/* from /tmp/stryker-test/node_modules/@stryker-mutator
11:51:24 (30889) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/html-reporter" (matched with expression @stryker-mutator/*)
11:51:24 (30889) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/jest-runner" (matched with expression @stryker-mutator/*)
11:51:24 (30889) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/typescript" (matched with expression @stryker-mutator/*)
11:51:24 (30889) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator" (matched with expression @stryker-mutator/*)
11:51:24 (30889) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/html-reporter
11:51:24 (30889) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/jest-runner
11:51:24 (30889) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/typescript
11:51:24 (30889) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator
11:51:24 (30889) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/core/src/reporters/index.js
11:51:24 (30889) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
11:51:24 (30889) DEBUG JestTestRunner Project root is /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:24 (30889) TRACE JestPromiseTestAdapter Invoking Jest with config {"globals":{"ts-jest":{"babelConfig":false,"tsConfig":{"target":"es2017"},"diagnostics":{"pathRegex":"/.(spec|test).ts$/"}}},"testEnvironment":"jest-environment-jsdom-fourteen","cache":false,"rootDir":"/tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207","testMatch":["<rootDir>/**/__tests__/**/*.ts?(x)","<rootDir>/**/?(*.)spec.ts?(x)"],"setupFiles":["tests/setup.ts"],"setupFilesAfterEnv":["tests/setupScript.ts"],"moduleFileExtensions":["ts","tsx","js","jsx","json","vue"],"coverageThreshold":{"global":{"statements":95,"branches":85,"functions":95,"lines":95}},"collectCoverage":false,"coverageDirectory":"build/coverage/","collectCoverageFrom":["**/*.{ts,vue}","!**/*.d.ts","!**/*.vue.ts","!@types/**","!main.ts","!pages/global-error/registerGlobalErrorHandler.ts","!pages/global-error/showErrorSnackbar.ts","!tests/**","!showcase/**","!component-test-pages/**"],"coverageReporters":["html","json","lcov","text"],"transform":{"^.+\\.vue$":"vue-jest","^.+\\.tsx?$":"ts-jest",".+\\.(css|styl|less|sass|scss)$":"jest-transform-stub"},"reporters":[],"moduleNameMapper":{"\\.(gif|png|jpg|jpeg|ttf|woff|woff2)$":"<rootDir>/tests/__mocks__/fileLoaderMock.ts","\\.svg$":"<rootDir>/tests/__mocks__/svgLoaderMock.ts","^file-loader[^!]*!":"<rootDir>/tests/__mocks__/fileLoaderMock.ts","\\.html$":"<rootDir>/tests/__mocks__/fileLoaderMock.ts"},"snapshotSerializers":["jest-serializer-vue"],"modulePathIgnorePatterns":["integration"],"verbose":false,"bail":false,"notify":false}
11:51:24 (30867) DEBUG ChildProcessProxy Disposing of worker process 30889
11:51:24 (30867) DEBUG ChildProcessProxy Kill 30889
11:51:24 (30867) DEBUG ChildProcessProxy Starting /tmp/stryker-test/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js in child process 30902
11:51:24 (30867) DEBUG TimeoutDecorator Starting timeout timer (300000 ms) for a test run
11:51:24 (30902) DEBUG ChildProcessProxyWorker Changing current working directory for this process to /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:24 (30902) DEBUG PluginLoader Loading @stryker-mutator/* from /tmp/stryker-test/node_modules/@stryker-mutator
11:51:24 (30902) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/html-reporter" (matched with expression @stryker-mutator/*)
11:51:24 (30902) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/jest-runner" (matched with expression @stryker-mutator/*)
11:51:24 (30902) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/typescript" (matched with expression @stryker-mutator/*)
11:51:24 (30902) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator" (matched with expression @stryker-mutator/*)
11:51:24 (30902) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/html-reporter
11:51:24 (30902) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/jest-runner
11:51:24 (30902) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/typescript
11:51:24 (30902) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator
11:51:24 (30902) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/core/src/reporters/index.js
11:51:24 (30902) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
11:51:24 (30902) DEBUG JestTestRunner Project root is /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:24 (30902) TRACE JestPromiseTestAdapter Invoking Jest with config {"globals":{"ts-jest":{"babelConfig":false,"tsConfig":{"target":"es2017"},"diagnostics":{"pathRegex":"/.(spec|test).ts$/"}}},"testEnvironment":"jest-environment-jsdom-fourteen","cache":false,"rootDir":"/tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207","testMatch":["<rootDir>/**/__tests__/**/*.ts?(x)","<rootDir>/**/?(*.)spec.ts?(x)"],"setupFiles":["tests/setup.ts"],"setupFilesAfterEnv":["tests/setupScript.ts"],"moduleFileExtensions":["ts","tsx","js","jsx","json","vue"],"coverageThreshold":{"global":{"statements":95,"branches":85,"functions":95,"lines":95}},"collectCoverage":false,"coverageDirectory":"build/coverage/","collectCoverageFrom":["**/*.{ts,vue}","!**/*.d.ts","!**/*.vue.ts","!@types/**","!main.ts","!pages/global-error/registerGlobalErrorHandler.ts","!pages/global-error/showErrorSnackbar.ts","!tests/**","!showcase/**","!component-test-pages/**"],"coverageReporters":["html","json","lcov","text"],"transform":{"^.+\\.vue$":"vue-jest","^.+\\.tsx?$":"ts-jest",".+\\.(css|styl|less|sass|scss)$":"jest-transform-stub"},"reporters":[],"moduleNameMapper":{"\\.(gif|png|jpg|jpeg|ttf|woff|woff2)$":"<rootDir>/tests/__mocks__/fileLoaderMock.ts","\\.svg$":"<rootDir>/tests/__mocks__/svgLoaderMock.ts","^file-loader[^!]*!":"<rootDir>/tests/__mocks__/fileLoaderMock.ts","\\.html$":"<rootDir>/tests/__mocks__/fileLoaderMock.ts"},"snapshotSerializers":["jest-serializer-vue"],"modulePathIgnorePatterns":["integration"],"verbose":false,"bail":false,"notify":false}
11:51:24 (30867) DEBUG ChildProcessProxy Disposing of worker process 30902
11:51:24 (30867) DEBUG ChildProcessProxy Kill 30902
11:51:24 (30867) DEBUG ChildProcessProxy Starting /tmp/stryker-test/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js in child process 30918
11:51:24 (30918) DEBUG ChildProcessProxyWorker Changing current working directory for this process to /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:24 (30918) DEBUG PluginLoader Loading @stryker-mutator/* from /tmp/stryker-test/node_modules/@stryker-mutator
11:51:24 (30918) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/html-reporter" (matched with expression @stryker-mutator/*)
11:51:24 (30918) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/jest-runner" (matched with expression @stryker-mutator/*)
11:51:24 (30918) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/typescript" (matched with expression @stryker-mutator/*)
11:51:24 (30918) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator" (matched with expression @stryker-mutator/*)
11:51:24 (30918) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/html-reporter
11:51:24 (30918) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/jest-runner
11:51:24 (30918) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/typescript
11:51:25 (30918) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator
11:51:25 (30918) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/core/src/reporters/index.js
11:51:25 (30918) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
11:51:25 (30918) DEBUG JestTestRunner Project root is /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:25 (30867) DEBUG ChildProcessProxy Disposing of worker process 30918
11:51:25 (30867) DEBUG ChildProcessProxy Kill 30918
11:51:25 (30867) DEBUG ChildProcessProxy Starting /tmp/stryker-test/node_modules/@stryker-mutator/core/src/test-runner/ChildProcessTestRunnerWorker.js in child process 30930
11:51:25 (30930) DEBUG ChildProcessProxyWorker Changing current working directory for this process to /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:25 (30930) DEBUG PluginLoader Loading @stryker-mutator/* from /tmp/stryker-test/node_modules/@stryker-mutator
11:51:25 (30930) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/html-reporter" (matched with expression @stryker-mutator/*)
11:51:25 (30930) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/jest-runner" (matched with expression @stryker-mutator/*)
11:51:25 (30930) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/typescript" (matched with expression @stryker-mutator/*)
11:51:25 (30930) DEBUG PluginLoader Loading plugin "/tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator" (matched with expression @stryker-mutator/*)
11:51:25 (30930) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/html-reporter
11:51:25 (30930) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/jest-runner
11:51:25 (30930) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/typescript
11:51:25 (30930) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/vue-mutator
11:51:25 (30930) DEBUG PluginLoader Loading plugins /tmp/stryker-test/node_modules/@stryker-mutator/core/src/reporters/index.js
11:51:25 (30930) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
11:51:25 (30930) DEBUG JestTestRunner Project root is /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
11:51:25 (30867) DEBUG ChildProcessProxy Disposing of worker process 30930
11:51:25 (30867) DEBUG ChildProcessProxy Kill 30930
11:51:25 (30867) ERROR InitialTestExecutor One or more tests resulted in an error:
Test runner crashed. Tried twice to restart it without any luck. Last time the error message was: Error: : โ Validation Error:
Module tests/setup.ts in the setupFiles option was not found.
<rootDir> is: /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
Configuration Documentation:
https://jestjs.io/docs/configuration.html
โ Validation Error:
Module tests/setup.ts in the setupFiles option was not found.
<rootDir> is: /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
Configuration Documentation:
https://jestjs.io/docs/configuration.html
Error: : โ Validation Error:
Module tests/setup.ts in the setupFiles option was not found.
<rootDir> is: /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
Configuration Documentation:
https://jestjs.io/docs/configuration.html
โ Validation Error:
Module tests/setup.ts in the setupFiles option was not found.
<rootDir> is: /tmp/stryker-test/frontend/.stryker-tmp/sandbox6479207
Configuration Documentation:
https://jestjs.io/docs/configuration.html
at ChildProcess.worker.on (/tmp/stryker-test/node_modules/@stryker-mutator/core/src/child-proxy/ChildProcessProxy.js:133:68)
at ChildProcess.emit (events.js:198:13)
at emit (internal/child_process.js:832:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Minimal repository demonstating the issue with stryker 4.0.0: https://github.com/michael42/stryker-issue-1847
@michael42 try
module.exports = function (config) {
config.set({
mutate: ['src/**/*.ts', '!src/**/*.spec.ts'],
mutator: 'vue',
testRunner: 'jest',
reporters: ['progress', 'clear-text', 'html'],
coverageAnalysis: 'off',
jest: {
rootDir: 'src'
}
});
};
Running into this same issue today.
@kmdrGroch It appears that when I add that, my jest.config's testEnvironment: '\
I can't tell if this is related: https://github.com/facebook/jest/issues/8520#issuecomment-498435066
My solution was to just avoid using \
Yes, it is specifically issue with Jest, we have had problems with it. So now please hang on and try these workarounds. We have this issue on top of our heads and we will be working on it as soon as we can.
For now I would ask for closing this one since #2163 is a summary of all these jest folder issues :)
Is this issue solved? Or can it be closed?
Seems to be still broken with stryker 4.0.0, here's a more minimal reproduction. Running jest works fine, but stryker run fails to run the setupFiles, setupFilesAfterEnv and additionally tries to run tests outside of the rootDir. Setting jest: { rootDir: 'src' } in the stryker.conf.js isn't allowed by the OptionsValidator.
Most helpful comment
Seems to be still broken with stryker 4.0.0, here's a more minimal reproduction. Running
jestworks fine, butstryker runfails to run thesetupFiles,setupFilesAfterEnvand additionally tries to run tests outside of therootDir. Settingjest: { rootDir: 'src' }in thestryker.conf.jsisn't allowed by the OptionsValidator.