diff --git a/web-src/package.json b/web-src/package.json index 0f0a2b0a..a92d9d7f 100644 --- a/web-src/package.json +++ b/web-src/package.json @@ -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", @@ -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%", diff --git a/web-src/tests/mutation/stryker.webpack.config.js b/web-src/tests/mutation/stryker.webpack.config.js new file mode 100644 index 00000000..9f78e51b --- /dev/null +++ b/web-src/tests/mutation/stryker.webpack.config.js @@ -0,0 +1,10 @@ +const path = require('path'); + +module.exports = { + entry: {'stryker_entry': './tests/unit/terminal_model_test.js'}, + resolve: { + alias: { + '@': path.resolve('src') + } + } +}; \ No newline at end of file diff --git a/web-src/tests/unit/stryker.conf.js b/web-src/tests/unit/stryker.conf.js index 8785eb89..e2317763 100644 --- a/web-src/tests/unit/stryker.conf.js +++ b/web-src/tests/unit/stryker.conf.js @@ -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'} }); }; \ No newline at end of file