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(Stryker CLI 'init'): Support for preset configuration during 'stryker init' #1248

Merged
merged 15 commits into from
Nov 27, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reincluded stryker.conf.js in stryker package after accidentally dele…
…ting it
Wmaarts committed Nov 22, 2018
commit 69abf2aa1789d67672d8daa9c252d2931bebbf76
61 changes: 61 additions & 0 deletions packages/stryker/stryker.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module.exports = function (config) {
var typescript = true;
var es6 = true;
if (typescript) {
config.set({
files: [
'node_modules/stryker-api/*.@(js|map)',
'node_modules/stryker-api/src/**/*.@(js|map)',
'package.json',
'src/**/*.ts',
'!src/**/*.d.ts',
'test/helpers/**/*.ts',
'test/unit/**/*.ts',
'!test/**/*.d.ts'
],
symlinkNodeModules: false,
mutate: ['src/**/*.ts'],
coverageAnalysis: 'perTest',
tsconfigFile: 'tsconfig.json',
mutator: 'typescript',
transpilers: [
'typescript'
],
mochaOptions: {
files: ['test/helpers/**/*.js', 'test/unit/**/*.js']
}
})
} else {
config.set({
files: [
'test/helpers/**/*.js',
'test/unit/**/*.js',
{ pattern: 'src/**/*.js', included: false, mutated: true },
{ pattern: 'node_modules/stryker-api/*.js', included: false, mutated: false },
{ pattern: 'node_modules/stryker-api/src/**/*.js', included: false, mutated: false }
],
coverageAnalysis: 'perTest',
mutator: es6 ? 'javascript' : 'es5'
});
}
config.set({
testFramework: 'mocha',
testRunner: 'mocha',
reporters: ['progress', 'html', 'clear-text', 'event-recorder', 'dashboard'],
maxConcurrentTestRunners: 4,
thresholds: {
high: 80,
low: 60,
break: null
},
fileLogLevel: 'trace',
logLevel: 'info',
plugins: [
require.resolve('../stryker-mocha-runner/src/index'),
require.resolve('../stryker-mocha-framework/src/index'),
require.resolve('../stryker-html-reporter/src/index'),
require.resolve('../stryker-typescript/src/index'),
require.resolve('../stryker-javascript-mutator/src/index')
]
});
};