File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,14 +174,22 @@ tree is being used.
174174npm install
175175```
176176
177+ ** Run ESLint**
178+
179+ You may want to run it to check code quality.
180+
181+ ```
182+ npm run lint
183+ ```
184+
177185** Run all tests**
178186```
179187npm test
180188```
181189
182190** Run tests by name**
183191```
184- npm test -- -t 'LinkedList'
192+ npm test -- 'LinkedList'
185193```
186194
187195** Playground**
@@ -192,7 +200,7 @@ tests for it in `./src/playground/__test__/playground.test.js`.
192200Then just simply run the following command to test if your playground code works as expected:
193201
194202```
195- npm test -- -t 'playground'
203+ npm test -- 'playground'
196204```
197205
198206## Useful Information
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ npm test
147147
148148** 按照名称执行测试**
149149```
150- npm test -- -t 'LinkedList'
150+ npm test -- 'LinkedList'
151151```
152152
153153** Playground**
@@ -157,7 +157,7 @@ npm test -- -t 'LinkedList'
157157然后,只需运行以下命令来测试你的 Playground 是否按无误:
158158
159159```
160- npm test -- -t 'playground'
160+ npm test -- 'playground'
161161```
162162
163163## 有用的信息
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ npm test
145145
146146** 以名稱執行該測試**
147147```
148- npm test -- -t 'LinkedList'
148+ npm test -- 'LinkedList'
149149```
150150** 練習場**
151151
@@ -154,7 +154,7 @@ npm test -- -t 'LinkedList'
154154接著直接執行下列的指令來測試你練習的 code 是否如預期運作:
155155
156156```
157- npm test -- -t 'playground'
157+ npm test -- 'playground'
158158```
159159
160160## 有用的資訊
Original file line number Diff line number Diff line change 11module . exports = {
2+ // The bail config option can be used here to have Jest stop running tests after
3+ // the first failure.
4+ bail : false ,
5+
6+ // Indicates whether each individual test should be reported during the run.
27 verbose : false ,
8+
9+ // Indicates whether the coverage information should be collected while executing the test
310 collectCoverage : false ,
11+
12+ // The directory where Jest should output its coverage files.
413 coverageDirectory : './coverage/' ,
14+
15+ // If the test path matches any of the patterns, it will be skipped.
16+ testPathIgnorePatterns : [ '<rootDir>/node_modules/' ] ,
17+
18+ // If the file path matches any of the patterns, coverage information will be skipped.
19+ coveragePathIgnorePatterns : [ '<rootDir>/node_modules/' ] ,
20+
21+ // The pattern Jest uses to detect test files.
22+ testRegex : '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$' ,
523} ;
You can’t perform that action at this time.
0 commit comments