-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Jest-runner): support jest configuration (#25)
Support configurable options using the `jest` property in your stryker config: ``` js jest: { project: 'react', // or 'default' config: require('path/to/your/custom/jestConfig.js') } ``` When neither of the options are specified, the jest config in your `package.json` file is used. To support reading jest configuration, we are now using a higher level jest api, the `jest-cli`, to start the tests. In order to keep it in a single process, the `run-in-band` option is provided, forcing jest to run inside the parent process.
- Loading branch information
Showing
70 changed files
with
1,619 additions
and
997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
component_depth: 1 | ||
languages: | ||
- javascript | ||
- typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
"test/**", | ||
"testResources/**" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
node_modules | ||
npm-debug.log | ||
debug.log | ||
coverage | ||
.tscache | ||
/resources | ||
typings | ||
*.js.map | ||
src/**/*.js | ||
test/**/*.js | ||
src/**/*.d.ts | ||
test/**/*.d.ts | ||
!Gruntfile.js | ||
!*.conf.js | ||
!testResources | ||
reports | ||
.idea | ||
/node_modules | ||
**/*.js | ||
**/*.js.map | ||
**/*.d.ts | ||
|
||
!testResources/**/*.js | ||
!stryker.conf.js | ||
/package-lock.json | ||
/reports | ||
/.nyc_output | ||
.stryker-tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
*.ts | ||
**/* | ||
!*.d.ts | ||
Gruntfile.js | ||
test | ||
tsconfig.json | ||
typings.json | ||
testResources | ||
typings | ||
.vscode | ||
*.png | ||
!bin/** | ||
!src/** | ||
src/**/*.map | ||
src/**/*.ts | ||
!src/**/*.d.ts | ||
!README.md | ||
!LICENSE | ||
!CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
language: node_js | ||
node_js: | ||
- "7" | ||
- "6" | ||
env: | ||
- JEST_VERSION=18.0.0 | ||
- JEST_VERSION=19.0.0 | ||
- JEST_VERSION=20.0.0 | ||
- JEST_VERSION=21.0.0 | ||
- node | ||
- 'lts/*' | ||
- '6' | ||
- '4' | ||
install: npm install | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
# Install desired version of Jest | ||
- npm i -D jest@${JEST_VERSION} jest-cli@${JEST_VERSION} | ||
before_install: | ||
- if [[ `npm -v` = 2* ]]; then npm i -g npm@3; fi | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,24 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run unit tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/grunt/bin/grunt", | ||
// "preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"mochaTest:unit" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run integration tests", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/grunt-cli/bin/grunt", | ||
// "preLa4unchTask": "ts", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"mochaTest:integration" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run stryker example", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/bin/stryker", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--configFile", | ||
"testResources/sampleProject/stryker.conf.js", | ||
"--logLevel", | ||
"trace", | ||
"--testFramework", | ||
"jasmine" | ||
], | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run own dog food", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/bin/stryker", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--configFile", | ||
"stryker.conf.js", | ||
"--logLevel", | ||
"info" | ||
], | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
}, | ||
{ | ||
"name": "Run stryker help", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/src/Stryker.js", | ||
"preLaunchTask": "build", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"--help" | ||
], | ||
"cwd": "${workspaceRoot}/.", | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "development" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": "${workspaceRoot}" | ||
} | ||
] | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Integration tests", | ||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | ||
"args": [ | ||
"-u", | ||
"tdd", | ||
"--timeout", | ||
"999999", | ||
"--colors", | ||
"${workspaceFolder}/test/helpers/**/*.js", | ||
"${workspaceFolder}/test/integration/**/*.js" | ||
], | ||
"internalConsoleOptions": "openOnSessionStart" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"files": { | ||
"exclude": { | ||
".git": "", | ||
".tscache": "", | ||
"**/*.js": { | ||
"when": "$(basename).ts" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.