From 742817e8d3425a4fa703febd4dc6fdb53d53f626 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 9 Jan 2020 16:17:00 +0000 Subject: [PATCH 1/8] Run Stryker --- .docker/docker-compose.dev.yml | 1 + .dockerignore | 1 + .github/workflows/ci.yml | 1 + .gitignore | 1 + Dockerfile | 1 + Makefile | 4 + package-lock.json | 338 +++++++++++++++++++++++++++++++++ package.json | 6 +- stryker.conf.js | 13 ++ 9 files changed, 365 insertions(+), 1 deletion(-) create mode 100644 stryker.conf.js diff --git a/.docker/docker-compose.dev.yml b/.docker/docker-compose.dev.yml index 687c5884..102d3d44 100644 --- a/.docker/docker-compose.dev.yml +++ b/.docker/docker-compose.dev.yml @@ -12,5 +12,6 @@ services: - ../src/:/app/src - ../package.json:/app/package.json - ../package-lock.json:/app/package-lock.json + - ../stryker.conf.js:/app/stryker.conf.js - ../test/:/app/test - ../tsconfig.json:/app/tsconfig.json diff --git a/.dockerignore b/.dockerignore index 93168e4f..d6c62767 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ /.dependabot/ /.github/ /.scripts/ +/.stryker-tmp/ /build/ /Makefile /node_modules/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d51f62e1..f2b6d84b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: test: - make lint - make test + - make mutation-test - TARGET=dev .github/smoke-test.sh - TARGET=prod .github/smoke-test.sh - .github/analyse.sh diff --git a/.gitignore b/.gitignore index 34b23da8..a58a8272 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/.stryker-tmp/ /build/ /node_modules/ diff --git a/Dockerfile b/Dockerfile index a827c7d2..39a6914f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,7 @@ ENV NODE_ENV=development COPY .eslintignore \ .eslintrc.js \ jest.config.js \ + stryker.conf.js \ tsconfig.json \ ./ COPY --from=npm-dev /app/ . diff --git a/Makefile b/Makefile index 665a03a3..048b8de5 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,10 @@ test: export TARGET = dev test: ## Run the tests ${DOCKER_COMPOSE} run --rm app npm run test +mutation-test: export TARGET = dev +mutation-test: ## Run the mutation tests + ${DOCKER_COMPOSE} run --rm app npm run test:mutation + run: ${DOCKER_COMPOSE} up --abort-on-container-exit --exit-code-from app; ${DOCKER_COMPOSE} down diff --git a/package-lock.json b/package-lock.json index 73ff3437..5f5aa486 100644 --- a/package-lock.json +++ b/package-lock.json @@ -556,6 +556,148 @@ "resolved": "https://registry.npmjs.org/@rdfjs/sink/-/sink-1.0.3.tgz", "integrity": "sha512-2KfYa8mAnptRNeogxhQqkWNXqfYVWO04jQThtXKepySrIwYmz83+WlevQtA4VDLFe+kFd2TwgL29ekPe5XVUfA==" }, + "@stryker-mutator/api": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/api/-/api-2.4.0.tgz", + "integrity": "sha512-VV12SWtoHKM8G2CSUHD7b8O6zJSygHjAju+e9qOjmrTaEgy8KUVO7OWuUNcRLpcRDVAlB2osuo3qndMstpPExg==", + "dev": true, + "requires": { + "mutation-testing-report-schema": "^1.1.0", + "tslib": "~1.10.0" + } + }, + "@stryker-mutator/core": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/core/-/core-2.4.0.tgz", + "integrity": "sha512-Z/PsUC/X2BOMJsbno9zWeNqx5sYeBYExtUQW2JL0niYNbs0xkhcU7S7UC2npjwGFOCrjjWzek5TQVGQtrlDhbw==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^2.4.0", + "@stryker-mutator/util": "^2.4.0", + "chalk": "~3.0.0", + "commander": "~4.0.0", + "get-port": "~5.0.0", + "glob": "~7.1.2", + "inquirer": "~7.0.0", + "istanbul-lib-instrument": "~3.3.0", + "lodash.flatmap": "^4.5.0", + "lodash.groupby": "^4.6.0", + "log4js": "~6.1.0", + "mkdirp": "~0.5.1", + "mutation-testing-metrics": "^1.1.1", + "progress": "~2.0.0", + "rimraf": "~3.0.0", + "rxjs": "~6.5.1", + "source-map": "~0.7.3", + "surrial": "~1.0.0", + "tree-kill": "~1.2.0", + "tslib": "~1.10.0", + "typed-inject": "~2.1.1", + "typed-rest-client": "~1.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", + "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "rimraf": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", + "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@stryker-mutator/jest-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/jest-runner/-/jest-runner-2.4.0.tgz", + "integrity": "sha512-mJNgIrUfY7lfnl+LedrTvGV82tMFrLlm+hJLjtaG6sZMCn/+b63rMF+zAPzZlANRtemx5gUOzZPSvdGeA0XsHQ==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^2.4.0", + "semver": "~6.3.0" + } + }, + "@stryker-mutator/typescript": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/typescript/-/typescript-2.4.0.tgz", + "integrity": "sha512-LUIqBP93VKf+PD2Z3Md4qJoFRfqGvwsQTsI/gI5cM6p8plhOT7mNqoTCmHPvqDOwKMaHRR4ltGEA8eSkQ92AOQ==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^2.4.0", + "@stryker-mutator/util": "^2.4.0", + "lodash.flatmap": "~4.5.0", + "semver": "~6.3.0", + "tslib": "~1.10.0" + } + }, + "@stryker-mutator/util": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-2.4.0.tgz", + "integrity": "sha512-+pKsudzHy7r51S39bpo/2N4lmdnFb9qhF34My3Y5BtXWZEcKm+FELWkCAC4H8CmO/j0RgTLyfnQDoaw4MjdLgg==", + "dev": true + }, "@types/accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", @@ -625,6 +767,12 @@ "@types/rdf-js": "*" } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/connect": { "version": "3.4.32", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz", @@ -2196,6 +2344,12 @@ } } }, + "date-format": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz", + "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==", + "dev": true + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -3094,6 +3248,17 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3666,6 +3831,23 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-port": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.0.0.tgz", + "integrity": "sha512-imzMU0FjsZqNa6BqOjbbW6w5BivHIuQKopjpPqcnx0AVHJQKCxK1O+Ab3OrVXhrekqfVMjwA9ZYu062R+KcIsQ==", + "dev": true, + "requires": { + "type-fest": "^0.3.0" + }, + "dependencies": { + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + } + } + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -5080,6 +5262,15 @@ } } }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -5236,6 +5427,18 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, + "lodash.flatmap": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz", + "integrity": "sha1-74y/QI9uSCaGYzRTBcaswLd4cC4=", + "dev": true + }, + "lodash.groupby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", + "integrity": "sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=", + "dev": true + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5260,6 +5463,36 @@ "integrity": "sha1-egy/ZfQ7WShiWp1NDcVLGMrcfvM=", "dev": true }, + "log4js": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.1.0.tgz", + "integrity": "sha512-fSCHMYsMJbHwfNTuMlopVVcfkKwIRLh5mpNZGB2oBbnSmr3yUTo4tL4xGBA0/q29xowlu96eTXGghJFNhPXMnA==", + "dev": true, + "requires": { + "date-format": "^3.0.0", + "debug": "^4.1.1", + "flatted": "^2.0.1", + "rfdc": "^1.1.4", + "streamroller": "^2.2.3" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -5459,6 +5692,22 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mutation-testing-metrics": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/mutation-testing-metrics/-/mutation-testing-metrics-1.2.2.tgz", + "integrity": "sha512-8qhRVdhezomBx3pzc2TYjZHM6rQ068Xlug+WttnjfHlAFPr9M6dWc9syAOSzYemJrsSHYYLXr0cD0eG7oPcG4A==", + "dev": true, + "requires": { + "lodash.groupby": "^4.6.0", + "mutation-testing-report-schema": "^1.2.0" + } + }, + "mutation-testing-report-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mutation-testing-report-schema/-/mutation-testing-report-schema-1.2.0.tgz", + "integrity": "sha512-4LdCuO33sH8R2YJ1idP+GUTjPR/VeSEml1tboQX0+5dSwH2YccUrw73rzAEOzkbeD+IyzBDHLzQKmanScV4smA==", + "dev": true + }, "mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -6498,6 +6747,12 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rfdc": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz", + "integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug==", + "dev": true + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -6978,6 +7233,40 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, + "streamroller": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.3.tgz", + "integrity": "sha512-AegmvQsscTRhHVO46PhCDerjIpxi7E+d2GxgUDu+nzw/HuLnUdxHWr6WQ+mVn/4iJgMKKFFdiUwFcFRDvcjCtw==", + "dev": true, + "requires": { + "date-format": "^2.1.0", + "debug": "^4.1.1", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "date-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", + "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "string-length": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", @@ -7124,6 +7413,12 @@ "has-flag": "^3.0.0" } }, + "surrial": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/surrial/-/surrial-1.0.0.tgz", + "integrity": "sha512-dkvhz3QvgraMeFWI9V+BinpNCNoaSNxKcxb0umRpkWeFlZ0WSbIfeTm9YtLA6a4kv/Q2pOMQOtMlcv/b5h6qpg==", + "dev": true + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -7421,6 +7716,12 @@ "punycode": "^2.1.0" } }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, "ts-jest": { "version": "24.3.0", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.3.0.tgz", @@ -7518,6 +7819,12 @@ "tslib": "^1.8.1" } }, + "tunnel": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -7555,6 +7862,25 @@ "mime-types": "~2.1.24" } }, + "typed-inject": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/typed-inject/-/typed-inject-2.1.1.tgz", + "integrity": "sha512-TaQrNsYjGTMmgfEwKtjP9+qyZu//H1RJ0RYNvvQ/rcAnpQGZLxHajb+O6TnyFZGfLaK/9319VYaG4PFXGjImug==", + "dev": true, + "requires": { + "typescript": "^3.6.3" + } + }, + "typed-rest-client": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz", + "integrity": "sha512-DVZRlmsfnTjp6ZJaatcdyvvwYwbWvR4YDNFDqb+qdTxpvaVP99YCpBkA8rxsLtAPjBVoDe4fNsnMIdZTiPuKWg==", + "dev": true, + "requires": { + "tunnel": "0.0.4", + "underscore": "1.8.3" + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -7597,6 +7923,12 @@ } } }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -7617,6 +7949,12 @@ "crypto-random-string": "^2.0.0" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", diff --git a/package.json b/package.json index 31f06b02..630a3c60 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,9 @@ "unique-string": "^2.0.0" }, "devDependencies": { + "@stryker-mutator/core": "^2.4.0", + "@stryker-mutator/jest-runner": "^2.4.0", + "@stryker-mutator/typescript": "^2.4.0", "@types/clownface": "^0.12.1", "@types/content-type": "^1.1.3", "@types/format-link-header": "^2.1.0", @@ -66,6 +69,7 @@ "lint:fix": "eslint . --fix --ext .js,.ts", "start": "node ./build/index.js", "start:dev": "nodemon --exec 'node --require ts-node/register ./src/index.ts' --ext .js,.json,.ts", - "test": "jest --silent" + "test": "jest --silent", + "test:mutation": "stryker run" } } diff --git a/stryker.conf.js b/stryker.conf.js new file mode 100644 index 00000000..f65559ae --- /dev/null +++ b/stryker.conf.js @@ -0,0 +1,13 @@ +module.exports = function (config) { + config.set({ + coverageAnalysis: 'off', + files: ['src/**/*.ts', 'test/**/*.ts'], + mutate: ['src/**/*.ts'], + mutator: 'typescript', + packageManager: 'npm', + reporters: ['clear-text', 'progress'], + testRunner: 'jest', + transpilers: [], + tsconfigFile: 'tsconfig.json', + }); +}; From e235724553a3f9556c3b1c19c6447674c486e6a7 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Wed, 11 Mar 2020 08:19:10 +0000 Subject: [PATCH 2/8] Trigger build From 965413e4a67bf74797ff823a1a0b656ccec50458 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 12 Mar 2020 10:49:42 +0000 Subject: [PATCH 3/8] Update for new Stryker and Postgres --- Makefile | 3 +- package-lock.json | 199 +++++++++++++++++++++++++++++++++------------- package.json | 6 +- 3 files changed, 148 insertions(+), 60 deletions(-) diff --git a/Makefile b/Makefile index 82085349..7236e31b 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,8 @@ api-test: ## Run the API tests mutation-test: export TARGET = dev mutation-test: ## Run the mutation tests - ${DOCKER_COMPOSE} run --rm app npm run test:mutation + $(MAKE) start-db + ${DOCKER_COMPOSE} run --rm app npm run test:mutation; ${STOP} run: $(MAKE) init-db diff --git a/package-lock.json b/package-lock.json index 85d2fbeb..eb83c715 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1292,45 +1292,62 @@ } }, "@stryker-mutator/api": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@stryker-mutator/api/-/api-2.5.0.tgz", - "integrity": "sha512-6z2AZeGcI+ZzqZEBX6h+vWt11uBzLfAg24kV0b/CJZ69zNELRLkjJnLaE4aU1o5uE6OyFGKJJ0OVxtZrnvZSuQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stryker-mutator/api/-/api-3.0.1.tgz", + "integrity": "sha512-E9ZKdVo7oR0QTxjrGk6hDlK6e/DCL9zzUkycrfGSp2iR6ZLQ2dbBQdQdJNce4lLV9muLauQ/HaHoy/BNGCNSgA==", "dev": true, "requires": { - "mutation-testing-report-schema": "^1.1.0", - "tslib": "~1.10.0" + "mutation-testing-report-schema": "~1.3.0", + "surrial": "^2.0.1", + "tslib": "~1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + } } }, "@stryker-mutator/core": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@stryker-mutator/core/-/core-2.5.0.tgz", - "integrity": "sha512-pafJ0FSQl5dJAte8/CGq+/X/kfVGRtLuf3M4aJ4YeHW+2fFOpCYhXOsEuJ66i9SVd2Ia9ItCKPk0CaOFSFE02g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stryker-mutator/core/-/core-3.0.1.tgz", + "integrity": "sha512-8wU9Y69iu57eBy9ddgmKz2iVo+lTpVn+qGmTmAddBGqIjy4vrw7/ogjNZePrrgcUzPLKVJ3O8eEHIy1+nRjn9g==", "dev": true, "requires": { - "@stryker-mutator/api": "^2.5.0", - "@stryker-mutator/util": "^2.5.0", + "@stryker-mutator/api": "^3.0.1", + "@stryker-mutator/util": "^3.0.1", "chalk": "~3.0.0", "commander": "~4.1.0", + "file-url": "~3.0.0", "get-port": "~5.0.0", "glob": "~7.1.2", - "inquirer": "~7.0.0", + "inquirer": "~7.1.0", "istanbul-lib-instrument": "~3.3.0", "lodash.flatmap": "^4.5.0", "lodash.groupby": "^4.6.0", - "log4js": "~6.1.0", - "mkdirp": "~0.5.1", - "mutation-testing-metrics": "^1.1.1", + "log4js": "6.1.2", + "mkdirp": "~1.0.3", + "mutation-testing-elements": "~1.3.0", + "mutation-testing-metrics": "~1.3.0", "progress": "~2.0.0", "rimraf": "~3.0.0", "rxjs": "~6.5.1", "source-map": "~0.7.3", - "surrial": "~1.0.0", + "surrial": "^2.0.1", "tree-kill": "~1.2.0", - "tslib": "~1.10.0", + "tslib": "~1.11.1", "typed-inject": "~2.1.1", "typed-rest-client": "~1.7.1" }, "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, "ansi-styles": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", @@ -1372,6 +1389,27 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + } + }, "istanbul-lib-coverage": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", @@ -1393,21 +1431,45 @@ "semver": "^6.0.0" } }, + "mkdirp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz", + "integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g==", + "dev": true + }, "rimraf": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", - "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" } }, + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -1416,36 +1478,50 @@ "requires": { "has-flag": "^4.0.0" } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true } } }, "@stryker-mutator/jest-runner": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@stryker-mutator/jest-runner/-/jest-runner-2.5.0.tgz", - "integrity": "sha512-awpfybEv2AL9l/rX2YSOZ68jMRjv7aHsTqt+TXIzc7XvcXPHjDo1oIB/UrgVbGr83lxcujjBAa/bUriwlxwkMw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stryker-mutator/jest-runner/-/jest-runner-3.0.1.tgz", + "integrity": "sha512-IQ0KOODD915ZlDi0rjNfAsFnY9YZMztaLaBn3+tiatwsfUmUualqw16vEKYuBsPtkNZTPRst7uipqIcgtAVOUw==", "dev": true, "requires": { - "@stryker-mutator/api": "^2.5.0", + "@stryker-mutator/api": "^3.0.1", "semver": "~6.3.0" } }, "@stryker-mutator/typescript": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@stryker-mutator/typescript/-/typescript-2.5.0.tgz", - "integrity": "sha512-y7NrmkTdvoS+Ef+6K8Z1WBRmQ5+Fh66ThWayCJrGBzd0PbNZEcSmv72ZtaYdWbAFwS46lg2hzwPd+q6E63QgLw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stryker-mutator/typescript/-/typescript-3.0.1.tgz", + "integrity": "sha512-SHTA7wSGTHwZCTM+ZeGzx+pRfG9bBEsFPUib+Rtqj09LrK8IxHa7iWNi4ipNrYIQejEtUA0XI5G7grLW4yZfpA==", "dev": true, "requires": { - "@stryker-mutator/api": "^2.5.0", - "@stryker-mutator/util": "^2.5.0", + "@stryker-mutator/api": "^3.0.1", + "@stryker-mutator/util": "^3.0.1", "lodash.flatmap": "~4.5.0", "semver": "~6.3.0", - "tslib": "~1.10.0" + "tslib": "~1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + } } }, "@stryker-mutator/util": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-2.5.0.tgz", - "integrity": "sha512-l3bTvN2YbhwPPO0F6WBbUkgY6NC/34/jxpVQGlw0rZn72MPuRQBJtrfAH7KFN0OBG4QmIA6PC6c4z0X5IaWfow==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-3.0.1.tgz", + "integrity": "sha512-007GnZ/0l2Vk+rCD90SGPMHgjwjfIAcp7pmUbVFD6ZZYm2SPLeFP3EjDQesDStdeg0BObIx4T9J5t3W8Ps1pWg==", "dev": true }, "@types/accepts": { @@ -2912,9 +2988,9 @@ } }, "commander": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.0.tgz", - "integrity": "sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true }, "component-emitter": { @@ -3995,6 +4071,12 @@ "flat-cache": "^2.0.1" } }, + "file-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "dev": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7540,9 +7622,9 @@ "dev": true }, "log4js": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.1.0.tgz", - "integrity": "sha512-fSCHMYsMJbHwfNTuMlopVVcfkKwIRLh5mpNZGB2oBbnSmr3yUTo4tL4xGBA0/q29xowlu96eTXGghJFNhPXMnA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.1.2.tgz", + "integrity": "sha512-knS4Y30pC1e0n7rfx3VxcLOdBCsEo0o6/C7PVTGxdVK+5b1TYOSGQPn9FDcrhkoQBV29qwmA2mtkznPAQKnxQg==", "dev": true, "requires": { "date-format": "^3.0.0", @@ -7757,20 +7839,25 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mutation-testing-elements": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mutation-testing-elements/-/mutation-testing-elements-1.3.0.tgz", + "integrity": "sha512-Bc4QSVEpqiVsNxcm5m0PPLA8bvQJ2rG7pw2A5tniQjbxDd5IJ7iMxnYn3YPyZ3KhltzfJiVe/0llZx4Mzm+OKQ==", + "dev": true + }, "mutation-testing-metrics": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/mutation-testing-metrics/-/mutation-testing-metrics-1.2.2.tgz", - "integrity": "sha512-8qhRVdhezomBx3pzc2TYjZHM6rQ068Xlug+WttnjfHlAFPr9M6dWc9syAOSzYemJrsSHYYLXr0cD0eG7oPcG4A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mutation-testing-metrics/-/mutation-testing-metrics-1.3.0.tgz", + "integrity": "sha512-T7UkUGljyCLMEWGK6YtRTjt4fxqi5+052gjDBkKBR6T5Po6DbwwIx6DAvFyBYzjBzUx6wUhXt7UaxB/wy+JyEg==", "dev": true, "requires": { - "lodash.groupby": "^4.6.0", - "mutation-testing-report-schema": "^1.2.0" + "mutation-testing-report-schema": "^1.3.0" } }, "mutation-testing-report-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mutation-testing-report-schema/-/mutation-testing-report-schema-1.2.0.tgz", - "integrity": "sha512-4LdCuO33sH8R2YJ1idP+GUTjPR/VeSEml1tboQX0+5dSwH2YccUrw73rzAEOzkbeD+IyzBDHLzQKmanScV4smA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mutation-testing-report-schema/-/mutation-testing-report-schema-1.3.0.tgz", + "integrity": "sha512-jrULcgLtD9pNkoHVDifx6YBh55c4STleJCRr1jxJ6Wy7Nx6DsD0MN3/BBZ2sQxEo+Y+wWzX+Udipyo1uLxRLUg==", "dev": true }, "mute-stream": { @@ -9817,9 +9904,9 @@ } }, "surrial": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/surrial/-/surrial-1.0.0.tgz", - "integrity": "sha512-dkvhz3QvgraMeFWI9V+BinpNCNoaSNxKcxb0umRpkWeFlZ0WSbIfeTm9YtLA6a4kv/Q2pOMQOtMlcv/b5h6qpg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/surrial/-/surrial-2.0.1.tgz", + "integrity": "sha512-s1LQlqY4am79aFsRLFtpqirqqqIODxdVX8RlphoYktb/9GMbMBqH15UraSoyGt5S5UEvpUzWaY0LcEhrvCh12g==", "dev": true }, "symbol-tree": { @@ -10124,9 +10211,9 @@ } }, "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true }, "tunnel-agent": { @@ -10182,13 +10269,13 @@ } }, "typed-rest-client": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.7.1.tgz", - "integrity": "sha512-fZRDWFtUp3J2E0jOiCJYZ9LDrYZHpjY95su//ekqXERS7C1qojP6movh7M4JGURJnBuTVsO0g2N4vEoW5o3Djw==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.7.2.tgz", + "integrity": "sha512-6ENgPdTH7s2Xcd6mBaahyMLBoXPi0LNe75E1T0RFOdhqN9ENpZmf3P5iloOlJUDaHYrucPPzMrBybr6BdS2URg==", "dev": true, "requires": { "qs": "^6.9.1", - "tunnel": "0.0.4", + "tunnel": "0.0.6", "underscore": "1.8.3" }, "dependencies": { diff --git a/package.json b/package.json index c520ab07..b527fc01 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,9 @@ "unique-string": "^2.0.0" }, "devDependencies": { - "@stryker-mutator/core": "^2.5.0", - "@stryker-mutator/jest-runner": "^2.5.0", - "@stryker-mutator/typescript": "^2.5.0", + "@stryker-mutator/core": "^3.0.1", + "@stryker-mutator/jest-runner": "^3.0.1", + "@stryker-mutator/typescript": "^3.0.1", "@types/clownface": "^0.12.7", "@types/content-type": "^1.1.3", "@types/format-link-header": "^2.1.0", From b865b2c9249c9e0ba99d9e4a3f45e2a8aabebf56 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 12 Mar 2020 11:01:19 +0000 Subject: [PATCH 4/8] Use JSON config --- Dockerfile | 2 +- stryker.conf.js | 13 ------------- stryker.conf.json | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 stryker.conf.js create mode 100644 stryker.conf.json diff --git a/Dockerfile b/Dockerfile index 59a27520..3822f560 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ ENV NODE_ENV=development COPY .eslintignore \ .eslintrc.js \ jest.config.js \ - stryker.conf.js \ + stryker.conf.json \ tsconfig.json \ ./ COPY --from=npm-dev /app/ . diff --git a/stryker.conf.js b/stryker.conf.js deleted file mode 100644 index f65559ae..00000000 --- a/stryker.conf.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (config) { - config.set({ - coverageAnalysis: 'off', - files: ['src/**/*.ts', 'test/**/*.ts'], - mutate: ['src/**/*.ts'], - mutator: 'typescript', - packageManager: 'npm', - reporters: ['clear-text', 'progress'], - testRunner: 'jest', - transpilers: [], - tsconfigFile: 'tsconfig.json', - }); -}; diff --git a/stryker.conf.json b/stryker.conf.json new file mode 100644 index 00000000..3f6927ad --- /dev/null +++ b/stryker.conf.json @@ -0,0 +1,18 @@ +{ + "coverageAnalysis": "off", + "files": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "mutate": [ + "src/**/*.ts" + ], + "mutator": "typescript", + "packageManager": "npm", + "reporters": [ + "clear-text", + "progress" + ], + "testRunner": "jest", + "tsconfigFile": "tsconfig.json" +} From ad8d5babbf9060d166ce50c5b7f23d7be263058d Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 12 Mar 2020 11:15:08 +0000 Subject: [PATCH 5/8] Ignore CLI scripts --- stryker.conf.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stryker.conf.json b/stryker.conf.json index 3f6927ad..005082b2 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -5,7 +5,8 @@ "test/**/*.ts" ], "mutate": [ - "src/**/*.ts" + "src/**/*.ts", + "!src/tools/**/*" ], "mutator": "typescript", "packageManager": "npm", From 57bdebfde1079ffc5c2d33cd8b32f206583d1a32 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 12 Mar 2020 11:31:49 +0000 Subject: [PATCH 6/8] Don't have a threshold for now --- stryker.conf.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stryker.conf.json b/stryker.conf.json index 005082b2..69d082a0 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -15,5 +15,8 @@ "progress" ], "testRunner": "jest", + "thresholds": { + "break": 100 + }, "tsconfigFile": "tsconfig.json" } From b18a09a4c8cedfd83455014b6fa46ad909a7d563 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 12 Mar 2020 11:47:37 +0000 Subject: [PATCH 7/8] Simplify config --- stryker.conf.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stryker.conf.json b/stryker.conf.json index 69d082a0..2be38347 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -1,5 +1,4 @@ { - "coverageAnalysis": "off", "files": [ "src/**/*.ts", "test/**/*.ts" @@ -9,7 +8,6 @@ "!src/tools/**/*" ], "mutator": "typescript", - "packageManager": "npm", "reporters": [ "clear-text", "progress" @@ -17,6 +15,5 @@ "testRunner": "jest", "thresholds": { "break": 100 - }, - "tsconfigFile": "tsconfig.json" + } } From fa72beae2988841dc42af6d0067428fb5030a508 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Mon, 30 Mar 2020 14:08:43 +0100 Subject: [PATCH 8/8] .PHONY --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c7908f8..a35a158d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL = help -.PHONY: help install gitmodules build start start-db init-db stop wait-healthy sh exec logs watch lint fix test unit-test integration-test api-validate api-test run dev prod +.PHONY: help install gitmodules build start start-db init-db stop wait-healthy sh exec logs watch lint fix test unit-test integration-test api-validate api-test mutation-test run dev prod SHELL = /usr/bin/env bash