Skip to content

Commit

Permalink
chore(jest): add typeahead for watch mode (microsoft#12467)
Browse files Browse the repository at this point in the history
* add package and configure jest

* add watch plugin to main jest config

* move devDepend to scripts package.json

* add to watchPlugins to jest-resources as well
  • Loading branch information
silviuaavram authored and DuanShaolong committed Apr 27, 2020
1 parent 90b510e commit 2b27909
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/jest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ module.exports = {
'^.+\\.tsx?$': 'babel-jest',
},
verbose: false,
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};
2 changes: 2 additions & 0 deletions scripts/jest/jest-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ module.exports = {
},

testURL: 'http://localhost',

watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
},
customConfig,
),
Expand Down
1 change: 1 addition & 0 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"jest-cli": "~24.9.0",
"jest-environment-jsdom": "~24.9.0",
"jest-react-fela": "^10.6.1",
"jest-watch-typeahead": "^0.4.2",
"jju": "^1.4.0",
"json-loader": "^0.5.7",
"json-stable-stringify-without-jsonify": "^1.0.1",
Expand Down
23 changes: 22 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13062,7 +13062,20 @@ jest-validate@^24.9.0:
leven "^3.1.0"
pretty-format "^24.9.0"

jest-watcher@^24.9.0:
jest-watch-typeahead@^0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/jest-watch-typeahead/-/jest-watch-typeahead-0.4.2.tgz#e5be959698a7fa2302229a5082c488c3c8780a4a"
integrity sha512-f7VpLebTdaXs81rg/oj4Vg/ObZy2QtGzAmGLNsqUS5G5KtSN68tFcIsbvNODfNyQxU78g7D8x77o3bgfBTR+2Q==
dependencies:
ansi-escapes "^4.2.1"
chalk "^2.4.1"
jest-regex-util "^24.9.0"
jest-watcher "^24.3.0"
slash "^3.0.0"
string-length "^3.1.0"
strip-ansi "^5.0.0"

jest-watcher@^24.3.0, jest-watcher@^24.9.0:
version "24.9.0"
resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b"
integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==
Expand Down Expand Up @@ -20149,6 +20162,14 @@ string-length@^2.0.0:
astral-regex "^1.0.0"
strip-ansi "^4.0.0"

string-length@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837"
integrity sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA==
dependencies:
astral-regex "^1.0.0"
strip-ansi "^5.2.0"

string-raw@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/string-raw/-/string-raw-1.0.1.tgz#01be2665a1cfa2c57520c910698f6ca276a4c726"
Expand Down

0 comments on commit 2b27909

Please sign in to comment.