diff --git a/.travis.yml b/.travis.yml index 4bb30d51..128af2ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,5 @@ node_js: - '8' - '10' -env: - - JOB=test - script: - - 'if [ "$JOB" = "test" ]; then npm run test-ci; fi' - - 'if [ "$JOB" = "lint" ]; then npm run lint; fi' - -matrix: - fast_finish: true - include: - - node_js: "node" - env: JOB=lint + - npm run test-ci diff --git a/package.json b/package.json index 351cdfc6..5bc16cab 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "@types/node": "^7.0.22", "fs-extra": "^6.0.1", "jest": "^23.1.0", + "jest-runner-tslint": "^1.0.5", "rimraf": "^2.5.4", "ts-jest": "^22.4.6", "tslint": "^5.10.0", @@ -67,19 +68,30 @@ "cacheDir": ".changelog" }, "jest": { - "roots": [ - "src" - ], - "transform": { - "^.+\\.jsx?$": "/node_modules/ts-jest/preprocessor.js", - "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "json" + "projects": [ + { + "displayName": "test", + "roots": [ + "src" + ], + "transform": { + "^.+\\.jsx?$": "/node_modules/ts-jest/preprocessor.js", + "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "json" + ] + }, + { + "runner": "jest-runner-tslint", + "displayName": "lint", + "moduleFileExtensions": ["ts"], + "testMatch": ["/src/**/*.ts"] + } ] } } diff --git a/yarn.lock b/yarn.lock index 2ffe16da..4eabc947 100644 --- a/yarn.lock +++ b/yarn.lock @@ -882,6 +882,15 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + cpx@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f" @@ -898,6 +907,13 @@ cpx@^1.5.0: shell-quote "^1.6.1" subarg "^1.0.0" +create-jest-runner@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/create-jest-runner/-/create-jest-runner-0.4.0.tgz#7a9419e9410484aec5048691c19745a4285baf45" + dependencies: + jest-worker "^22.0.0" + throat "^4.1.0" + cross-spawn@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -1094,6 +1110,12 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +error-ex@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + es-abstract@^1.4.3: version "1.7.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" @@ -1154,6 +1176,10 @@ esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1815,6 +1841,10 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + is-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -2282,6 +2312,14 @@ jest-resolve@^23.1.0: chalk "^2.0.1" realpath-native "^1.0.0" +jest-runner-tslint@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/jest-runner-tslint/-/jest-runner-tslint-1.0.5.tgz#040fc508ceddbf629bdafc15de00b133a5d976ac" + dependencies: + cosmiconfig "^4.0.0" + create-jest-runner "^0.4.0" + tslint "^5.8.0" + jest-runner@^23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5" @@ -2404,6 +2442,12 @@ jest-watcher@^23.1.0: chalk "^2.0.1" string-length "^2.0.0" +jest-worker@^22.0.0: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.4.3.tgz#5c421417cba1c0abf64bf56bd5fb7968d79dd40b" + dependencies: + merge-stream "^1.0.1" + jest-worker@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc" @@ -2438,6 +2482,13 @@ js-yaml@^3.7.0: argparse "^1.0.7" esprima "^2.6.0" +js-yaml@^3.9.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" @@ -2477,7 +2528,7 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" -json-parse-better-errors@^1.0.0: +json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -3090,6 +3141,13 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -3408,6 +3466,10 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -3878,7 +3940,7 @@ test-exclude@^4.2.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -throat@^4.0.0: +throat@^4.0.0, throat@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" @@ -3966,7 +4028,7 @@ tslib@^1.8.0, tslib@^1.8.1: version "1.9.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e" -tslint@^5.10.0: +tslint@^5.10.0, tslint@^5.8.0: version "5.10.0" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3" dependencies: