Skip to content

Commit 251f8d7

Browse files
committed
add jest watch
1 parent d7f2009 commit 251f8d7

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

jest.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ module.exports = {
88
'ts-jest': {
99
diagnostics: false
1010
}
11-
}
11+
},
12+
watchPlugins: [
13+
'jest-watch-typeahead/filename',
14+
'jest-watch-typeahead/testname'
15+
]
1216
}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@
4141
"@typescript-eslint/typescript-estree": "^2.14.0",
4242
"eslint": "^6.8.0",
4343
"eslint-plugin-vue-libs": "^4.0.0",
44-
"jest": "^25.0.0",
44+
"jest": "^25.2.4",
45+
"jest-watch-typeahead": "^0.5.0",
4546
"jsdom": "^16.0.0",
4647
"lerna-changelog": "^1.0.0",
4748
"memory-fs": "^0.5.0",
4849
"opener": "^1.5.1",
4950
"prettier": "^2.0.4",
5051
"shipjs": "^0.18.0",
51-
"ts-jest": "^25.0.0",
52-
"typescript": "^3.7.4",
52+
"ts-jest": "^25.3.0",
53+
"typescript": "^3.8.3",
5354
"typescript-eslint-language-service": "^2.0.3",
5455
"vue-loader": "^15.7.0",
5556
"vue-template-compiler": "^2.6.11",
@@ -77,6 +78,7 @@
7778
},
7879
"scripts": {
7980
"build": "tsc -p .",
81+
"build:watch": "tsc -p . --watch",
8082
"clean": "rm -rf ./coverage && rm -rf ./lib/*.js*",
8183
"coverage": "opener coverage/lcov-report/index.html",
8284
"lint": "eslint ./src ./test --ext .ts",
@@ -87,6 +89,6 @@
8789
"test": "yarn lint && yarn test:cover",
8890
"test:cover": "yarn test:unit --coverage",
8991
"test:unit": "jest --env node",
90-
"watch": "tsc -p . --watch"
92+
"test:watch": "jest --env node --watch"
9193
}
9294
}

yarn.lock

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,7 @@ jest-pnp-resolver@^1.2.1:
39623962
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a"
39633963
integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==
39643964

3965-
jest-regex-util@^25.2.6:
3965+
jest-regex-util@^25.2.1, jest-regex-util@^25.2.6:
39663966
version "25.2.6"
39673967
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964"
39683968
integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw==
@@ -4091,7 +4091,20 @@ jest-validate@^25.2.6:
40914091
leven "^3.1.0"
40924092
pretty-format "^25.2.6"
40934093

4094-
jest-watcher@^25.2.7:
4094+
jest-watch-typeahead@^0.5.0:
4095+
version "0.5.0"
4096+
resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.5.0.tgz#903dba6112f22daae7e90b0a271853f7ff182008"
4097+
integrity sha512-4r36w9vU8+rdg48hj0Z7TvcSqVP6Ao8dk04grlHQNgduyCB0SqrI0xWIl85ZhXrzYvxQ0N5H+rRLAejkQzEHeQ==
4098+
dependencies:
4099+
ansi-escapes "^4.2.1"
4100+
chalk "^3.0.0"
4101+
jest-regex-util "^25.2.1"
4102+
jest-watcher "^25.2.4"
4103+
slash "^3.0.0"
4104+
string-length "^3.1.0"
4105+
strip-ansi "^6.0.0"
4106+
4107+
jest-watcher@^25.2.4, jest-watcher@^25.2.7:
40954108
version "25.2.7"
40964109
resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.2.7.tgz#01db4332d34d14c03c9ef22255125a3b07f997bc"
40974110
integrity sha512-RdHuW+f49tahWtluTnUdZ2iPliebleROI2L/J5phYrUS6DPC9RB3SuUtqYyYhGZJsbvRSuLMIlY/cICJ+PIecw==
@@ -4111,7 +4124,7 @@ jest-worker@^25.2.6:
41114124
merge-stream "^2.0.0"
41124125
supports-color "^7.0.0"
41134126

4114-
jest@^25.0.0:
4127+
jest@^25.2.4:
41154128
version "25.2.7"
41164129
resolved "https://registry.yarnpkg.com/jest/-/jest-25.2.7.tgz#3929a5f35cdd496f7756876a206b99a94e1e09ae"
41174130
integrity sha512-XV1n/CE2McCikl4tfpCY950RytHYvxdo/wvtgmn/qwA8z1s16fuvgFL/KoPrrmkqJTaPMUlLVE58pwiaTX5TdA==
@@ -6763,7 +6776,7 @@ trim-off-newlines@^1.0.0:
67636776
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"
67646777
integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM=
67656778

6766-
ts-jest@^25.0.0:
6779+
ts-jest@^25.3.0:
67676780
version "25.3.1"
67686781
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.3.1.tgz#58e2ed3506e4e4487c0b9b532846a5cade9656ba"
67696782
integrity sha512-O53FtKguoMUByalAJW+NWEv7c4tus5ckmhfa7/V0jBb2z8v5rDSLFC1Ate7wLknYPC1euuhY6eJjQq4FtOZrkg==
@@ -6855,7 +6868,7 @@ typescript-eslint-language-service@^2.0.3:
68556868
dependencies:
68566869
read-pkg-up "^7.0.0"
68576870

6858-
typescript@^3.7.4:
6871+
typescript@^3.8.3:
68596872
version "3.8.3"
68606873
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
68616874
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==

0 commit comments

Comments
 (0)