From 09d7616f0a302198fa56aabf9b96193fc3ed6ec6 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 16 Oct 2019 22:11:31 -0400 Subject: [PATCH] add Stryker Mutator according to https://stryker-mutator.io/stryker/quickstart (using npx) with mutation testing limited to `lib/*.js` (`lib/parser/pbxproj.js` not included) and add generated Stryker artifacts to .gitignore --- .gitignore | 2 ++ package.json | 4 ++++ stryker.conf.js | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 stryker.conf.js diff --git a/.gitignore b/.gitignore index 796bd5b..0004701 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules/* .DS_Store npm-debug.log package-lock.json +.stryker-tmp +reports diff --git a/package.json b/package.json index b25fa48..a6397e2 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,15 @@ "uuid": "^3.3.2" }, "devDependencies": { + "@stryker-mutator/core": "^2.1.0", + "@stryker-mutator/html-reporter": "^2.1.0", + "@stryker-mutator/javascript-mutator": "^2.1.0", "nodeunit": "^0.11.3", "pegjs": "^0.10.0" }, "scripts": { "pegjs": "node_modules/.bin/pegjs lib/parser/pbxproj.pegjs", + "stryker": "stryker run", "test": "node_modules/.bin/nodeunit test/parser test" }, "license": "Apache-2.0", diff --git a/stryker.conf.js b/stryker.conf.js new file mode 100644 index 0000000..683a619 --- /dev/null +++ b/stryker.conf.js @@ -0,0 +1,11 @@ +module.exports = function(config) { + config.set({ + mutator: "javascript", + mutate: [ 'lib/*.js' ], + packageManager: "npm", + reporters: ["html", "clear-text", "progress"], + testRunner: "command", + transpilers: [], + coverageAnalysis: "all" + }); +};