Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jest-runner): support mutation switching #2350

Merged
merged 14 commits into from
Aug 5, 2020
Merged
5 changes: 4 additions & 1 deletion e2e/tasks/run-e2e-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const mutationSwitchingTempWhiteList = [
'babel-transpiling',
'typescript-transpiling',
'command',
'vue-cli-typescript-mocha'
'vue-cli-typescript-mocha',
'jest-react-ts',
'jest-node',
'jest-with-ts'
]

function runE2eTests() {
Expand Down
5 changes: 2 additions & 3 deletions e2e/test/jest-node/stryker.conf.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/stryker-mutator/stryker/master/packages/api/schema/stryker-core.json",
"$schema": "../../node_modules/@stryker-mutator/core/schema/stryker-schema.json",
"mutator": "javascript",
"packageManager": "npm",
"testRunner": "jest",
"tempDirName": "stryker-tmp",
"transpilers": [],
"concurrency": 2,
"concurrency": 1,
"coverageAnalysis": "off",
"reporters": [
"clear-text",
Expand Down
4 changes: 0 additions & 4 deletions e2e/test/jest-react-ts/b.js

This file was deleted.

8 changes: 5 additions & 3 deletions e2e/test/jest-react-ts/stryker.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/stryker-mutator/stryker/master/packages/api/schema/stryker-core.json",
"mutator": "typescript",
"$schema": "../../node_modules/@stryker-mutator/core/schema/stryker-schema.json",
"packageManager": "npm",
"testRunner": "jest",
"tempDirName": "stryker-tmp",
Expand All @@ -11,7 +10,10 @@
"concurrency": 2,
"coverageAnalysis": "off",
"reporters": [
"event-recorder"
"event-recorder",
"progress",
"clear-text",
"html"
],
"jest": {
"projectType": "create-react-app"
Expand Down
6 changes: 3 additions & 3 deletions e2e/test/jest-react-ts/verify/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { expectMetrics } from '../../../helpers';
describe('After running stryker on jest-react project', () => {
it('should report expected scores', async () => {
await expectMetrics({
survived: 45,
killed: 46,
timeout: 5,
survived: 53,
killed: 53,
timeout: 6,
noCoverage: 0
});
});
Expand Down
52 changes: 40 additions & 12 deletions e2e/test/jest-react/.babelrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
{
"presets": [
["es2015", {"modules": false}],
"react"
[
"@babel/env",
{
"loose": true,
"shippedProposals": true,
"modules": "commonjs",
"targets": {
"ie": 9
}
}
],
"@babel/react"
],
"plugins": [
"transform-object-rest-spread"
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-object-rest-spread"
],
"env": {
"lib-dir": {
"plugins": ["transform-es2015-modules-commonjs"]
},
"webpack": {
"plugins": ["transform-es2015-modules-commonjs"]
},
"test": {
"plugins": ["transform-es2015-modules-commonjs"]
"esm-dir": {
"presets": [
[
"@babel/env",
{
"loose": true,
"shippedProposals": true,
"modules": false,
"targets": {
"ie": 9
}
}
],
"@babel/react"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"useESModules": true
}
]
]
}
}
}
}
Loading