Skip to content

Commit

Permalink
#282 adapted stryker mutation to new vue-cli structure
Browse files Browse the repository at this point in the history
  • Loading branch information
bugy committed Apr 23, 2020
1 parent cbb7f9c commit 42ab2fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
10 changes: 4 additions & 6 deletions web-src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
"vuex": "^3.1.2"
},
"devDependencies": {
"@stryker-mutator/babel-transpiler": "^1.3.1",
"@stryker-mutator/core": "^1.3.1",
"@stryker-mutator/javascript-mutator": "^1.3.1",
"@stryker-mutator/core": "^3.1.0",
"@stryker-mutator/javascript-mutator": "^3.1.0",
"@stryker-mutator/karma-runner": "^3.1.0",
"@stryker-mutator/mocha-framework": "^3.1.0",
"@stryker-mutator/webpack-transpiler": "^1.3.1",
"@stryker-mutator/webpack-transpiler": "^3.1.0",
"@vue/cli-plugin-babel": "~4.2.0",
"@vue/cli-plugin-router": "~4.2.0",
"@vue/cli-plugin-vuex": "~4.2.0",
Expand Down Expand Up @@ -52,7 +50,7 @@
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:unit-ci": "vue-cli-service test:unit -b ChromeHeadless",
"stryker": "stryker run tests/stryker.conf.js"
"stryker": "stryker run tests/unit/stryker.conf.js"
},
"browserslist": [
"> 1%",
Expand Down
10 changes: 10 additions & 0 deletions web-src/tests/mutation/stryker.webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

module.exports = {
entry: {'stryker_entry': './tests/unit/terminal_model_test.js'},
resolve: {
alias: {
'@': path.resolve('src')
}
}
};
18 changes: 9 additions & 9 deletions web-src/tests/unit/stryker.conf.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
module.exports = function (config) {
config.set({
testRunner: 'karma',
testFramework: 'mocha',
karma: {
project: 'custom',
configFile: 'tests/karma.conf.js',
config: {
basePath: null,
files: ['../../web/test_entry.js']
frameworks: ['mocha'],
files: ['dist/*.js']
}
},
tempDir: '/tmp',
mutate: ['js/components/terminal/terminal_model.js'],
tempDirName: '/tmp',
mutate: ['src/common/components/terminal/terminal_model.js'],
files: ['src/**/*.js', 'tests/unit/**/*.js'],
mutator: 'javascript',
coverageAnalysis: 'off',
logLevel: 'info',
transpilers: ['webpack'],
webpack: {
configFile: 'webpack.mutation.js'
configFile: 'tests/mutation/stryker.webpack.config.js'
},
reporter: ['progress', 'clear-text', 'html']
reporter: ['progress', 'clear-text', 'html'],
htmlReporter: {baseDir: '/tmp/reports/stryker'}
});
};

0 comments on commit 42ab2fb

Please sign in to comment.