diff --git a/.gitignore b/.gitignore index b50b2563..c10cb6a8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # testing /coverage +/.stryker-tmp # production /build diff --git a/.travis.yml b/.travis.yml index 7abbe21f..4ca6d188 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,8 @@ install: script: - npm run lint - npm run test:ci - - if [[ -z $TRAVIS_TAG ]]; then docker build -t shlink-web-client:test . ; fi # Test docker image build only when no tag is present + - if [[ -z $TRAVIS_TAG ]]; then docker build -t shlink-web-client:test . ; fi + - if [[ -z $TRAVIS_TAG ]]; then npm run mutate ; fi after_success: - node_modules/.bin/ocular coverage/clover.xml diff --git a/package-lock.json b/package-lock.json index 4eb8bad0..415d030c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -921,6 +921,224 @@ "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", "dev": true }, + "@stryker-mutator/api": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/api/-/api-1.2.0.tgz", + "integrity": "sha512-/4tx8cbnVe/fdl2WPcG89HZNK3CG1grG3ex2V1RYmMx7dhb5JclOq/oAhhsxLvZtpgL1ai9ui1rRFMWFdQR2Yg==", + "dev": true, + "requires": { + "mutation-testing-report-schema": "^1.0.0", + "tslib": "~1.9.3" + } + }, + "@stryker-mutator/core": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/core/-/core-1.2.0.tgz", + "integrity": "sha512-fODByHtYftDgDq4uIFgGAIi5ClWG/5WQM7N7eiPD5yeZnOiSOmBSrlLGdsVur28hdVLF9+L5ScaOE26kA12ELQ==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^1.2.0", + "@stryker-mutator/util": "^1.2.0", + "chalk": "~2.4.1", + "commander": "~2.19.0", + "get-port": "~4.2.0", + "glob": "~7.1.2", + "inquirer": "~6.2.0", + "istanbul-lib-instrument": "~3.1.0", + "lodash": "~4.17.4", + "log4js": "~4.1.0", + "mkdirp": "~0.5.1", + "prettier": "~1.16.1", + "progress": "~2.0.0", + "rimraf": "~2.6.1", + "rxjs": "~6.3.0", + "source-map": "~0.6.1", + "surrial": "~1.0.0", + "tree-kill": "~1.2.0", + "tslib": "~1.9.3", + "typed-inject": "~1.0.0", + "typed-rest-client": "~1.2.0" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.2.tgz", + "integrity": "sha512-5OCdsY81MIHduQqGs5k9JTkOioROzpl3r2PSdkh+1C3j5WxtRWhyhgxMv7wRuEsPsg4K0M9OVWtJ045lyBN73Q==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "istanbul-lib-coverage": "^2.0.4", + "semver": "^6.0.0" + } + }, + "prettier": { + "version": "1.16.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", + "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", + "dev": true + }, + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true + } + } + }, + "@stryker-mutator/html-reporter": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/html-reporter/-/html-reporter-1.2.0.tgz", + "integrity": "sha512-0YGDbiVZP7/f3bhzewsVVP7TexxJNEEBYt7fRkosotuJ48RRWHWYKLl/0/BBRM/cJaQo1/r9CzSxE+/HRH4ABQ==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^1.2.0", + "@stryker-mutator/util": "^1.2.0", + "file-url": "~2.0.0", + "mkdirp": "~0.5.1", + "mutation-testing-elements": "^1.0.2", + "rimraf": "~2.6.1", + "typed-html": "~1.0.0" + } + }, + "@stryker-mutator/javascript-mutator": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/javascript-mutator/-/javascript-mutator-1.2.0.tgz", + "integrity": "sha512-Xxra18EebsbkMsN/w1WSE9otrt6+mtDrNy5TceXAFKw31wyVf6WzUCD6yvNR5DR0wheACTz651jXNE+FT9G2mA==", + "dev": true, + "requires": { + "@babel/generator": "~7.4.0", + "@babel/parser": "~7.4.0", + "@babel/traverse": "~7.4.0", + "@stryker-mutator/api": "^1.2.0", + "lodash": "~4.17.4", + "tslib": "~1.9.3" + }, + "dependencies": { + "@babel/generator": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "dev": true, + "requires": { + "@babel/types": "^7.4.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "dev": true, + "requires": { + "@babel/types": "^7.4.0" + } + }, + "@babel/parser": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", + "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", + "dev": true + }, + "@babel/traverse": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", + "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/types": "^7.4.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + } + }, + "@babel/types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, + "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" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@stryker-mutator/jest-runner": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/jest-runner/-/jest-runner-1.2.0.tgz", + "integrity": "sha512-zGxV2HbXB0wwySiQHxQAaM+JilI0yCnAT2JU+CGEK69V8Cg6S4wKIbryrxw8zMfUgDL+6dGSSCBBpgeNkark0w==", + "dev": true, + "requires": { + "@stryker-mutator/api": "^1.2.0", + "semver": "~6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true + } + } + }, + "@stryker-mutator/util": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-1.2.0.tgz", + "integrity": "sha512-EvoT0RZf1SMn4DwtveJO1BIJRC9vrWlOHvu/njDMo0M/4FJltOC0kjOSItoMQc0fxvct8osQKL2FL48xidEG0g==", + "dev": true + }, "@svgr/core": { "version": "2.4.1", "resolved": "https://registry.yarnpkg.com/@svgr/core/-/core-2.4.1.tgz", @@ -5211,6 +5429,12 @@ "whatwg-url": "^7.0.0" } }, + "date-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.0.0.tgz", + "integrity": "sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA==", + "dev": true + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz", @@ -6723,6 +6947,12 @@ "schema-utils": "^1.0.0" } }, + "file-url": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-2.0.2.tgz", + "integrity": "sha1-6VF4TXkJUSfTcTApqwY/QIGMoq4=", + "dev": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz", @@ -6858,6 +7088,12 @@ "write": "^0.2.1" } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz", @@ -7623,6 +7859,12 @@ "integrity": "sha1-uHe0mlwWrvrDZV8u0upbaE340gM=", "dev": true }, + "get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true + }, "get-stdin": { "version": "4.0.1", "resolved": "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz", @@ -10526,6 +10768,36 @@ "chalk": "^2.0.1" } }, + "log4js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-4.1.0.tgz", + "integrity": "sha512-eDa+zZPeVEeK6QGJAePyXM6pg4P3n3TO5rX9iZMVY48JshsTyLJZLIL5HipI1kQ2qLsSyOpUqNND/C5H4WhhiA==", + "dev": true, + "requires": { + "date-format": "^2.0.0", + "debug": "^4.1.1", + "flatted": "^2.0.0", + "rfdc": "^1.1.2", + "streamroller": "^1.0.4" + }, + "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.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, "loglevel": { "version": "1.6.1", "resolved": "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz", @@ -11082,6 +11354,18 @@ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", "dev": true }, + "mutation-testing-elements": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/mutation-testing-elements/-/mutation-testing-elements-1.0.7.tgz", + "integrity": "sha512-yeF8xZoIYPFlRB98MUalimIam7FKwS5aC1+I0DSd9ibFdDntNRaBkIZOhNt5ujE5ernJIJN4XvZmGsYhTR03BQ==", + "dev": true + }, + "mutation-testing-report-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/mutation-testing-report-schema/-/mutation-testing-report-schema-1.0.5.tgz", + "integrity": "sha512-Vy0Z2RBO2YiFviZUzzipGfbyPkHmL+Wz4BxUUvmeSGcFSDLtLCxib5FEHlJKjjxqCwnhirs3agAW8zngWQx4zw==", + "dev": true + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz", @@ -14537,6 +14821,12 @@ "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", "dev": true }, + "rfdc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz", + "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", + "dev": true + }, "rgb-regex": { "version": "1.0.1", "resolved": "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz", @@ -15539,6 +15829,36 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, + "streamroller": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.4.tgz", + "integrity": "sha512-Wc2Gm5ygjSX8ZpW9J7Y9FwiSzTlKSvcl0FTTMd3rn7RoxDXpBW+xD9TY5sWL2n0UR61COB0LG1BQvN6nTUQbLQ==", + "dev": true, + "requires": { + "async": "^2.6.1", + "date-format": "^2.0.0", + "debug": "^3.1.0", + "fs-extra": "^7.0.0", + "lodash": "^4.17.10" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, "string-length": { "version": "2.0.0", "resolved": "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz", @@ -15682,6 +16002,79 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "stryker-cli": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stryker-cli/-/stryker-cli-1.0.0.tgz", + "integrity": "sha512-PTeMKADJXNH1hEXd4OeqPbOKD/now6mepABuDkUyA/0OQpT02hBZ06JZEWz5LoTWZmefxMlERfEHWBmgaZvRlQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "inquirer": "^6.2.2", + "resolve": "^1.10.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + } + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "style-loader": { "version": "0.23.1", "resolved": "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz", @@ -16046,6 +16439,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 + }, "svg-tags": { "version": "1.0.0", "resolved": "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz", @@ -16485,6 +16884,12 @@ "punycode": "^2.1.0" } }, + "tree-kill": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", + "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", + "dev": true + }, "trim": { "version": "0.0.1", "resolved": "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz", @@ -16547,6 +16952,12 @@ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, + "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.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -16581,6 +16992,28 @@ "mime-types": "~2.1.18" } }, + "typed-html": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-html/-/typed-html-1.0.0.tgz", + "integrity": "sha512-/MGJs8DqjNdJWSnUdV7U7VeSwhKYNZli0wq84h5zPg/+76DNuDEnWloAkzmoYdgQOWtwZIlyLUQMLHYuUnP3tQ==", + "dev": true + }, + "typed-inject": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-inject/-/typed-inject-1.0.0.tgz", + "integrity": "sha512-u1ZR7Zvu0NIIZjiLg8RSp4oOoSs8wUnsn8mQ3Pnl8fHmCNkA7Y/aOKTR/Stp4R9/bazwphSktuOEMP++DdlAKQ==", + "dev": true + }, + "typed-rest-client": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", + "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", + "dev": true, + "requires": { + "tunnel": "0.0.4", + "underscore": "1.8.3" + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz", @@ -16615,6 +17048,12 @@ "source-map": "~0.6.1" } }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, "unherit": { "version": "1.1.1", "resolved": "https://registry.yarnpkg.com/unherit/-/unherit-1.1.1.tgz", diff --git a/package.json b/package.json index 99f33260..3f322fd4 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "build": "node scripts/build.js", "test": "node scripts/test.js --env=jsdom --colors", "test:ci": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=clover", - "test:pretty": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=html" + "test:pretty": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=html", + "mutate": "./node_modules/.bin/stryker run" }, "dependencies": { "@fortawesome/fontawesome-free": "^5.6.3", @@ -59,6 +60,10 @@ }, "devDependencies": { "@babel/core": "^7.1.6", + "@stryker-mutator/core": "^1.2.0", + "@stryker-mutator/html-reporter": "^1.2.0", + "@stryker-mutator/javascript-mutator": "^1.2.0", + "@stryker-mutator/jest-runner": "^1.2.0", "@svgr/webpack": "^2.4.1", "adm-zip": "0.4.11", "autoprefixer": "^7.1.6", @@ -113,6 +118,7 @@ "resolve": "^1.8.1", "sass-loader": "^7.1.0", "serve": "^10.0.0", + "stryker-cli": "^1.0.0", "style-loader": "^0.23.0", "stylelint": "^9.9.0", "stylelint-config-adidas": "^1.2.1", diff --git a/stryker.conf.js b/stryker.conf.js new file mode 100644 index 00000000..a58eeaef --- /dev/null +++ b/stryker.conf.js @@ -0,0 +1,17 @@ +module.exports = (config) => config.set({ + mutate: [ 'src/**/*.js' ], + mutator: 'javascript', + testRunner: 'jest', + reporters: [ 'progress', 'clear-text', 'html' ], + coverageAnalysis: 'off', + jest: { + projectType: 'custom', + config: require(`${__dirname}/jest.config.js`), + enableFindRelatedTests: true, + }, + thresholds: { + high: 80, + low: 60, + break: null, + }, +});