File tree 4 files changed +32
-6
lines changed
4 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -174,14 +174,22 @@ tree is being used.
174
174
npm install
175
175
```
176
176
177
+ ** Run ESLint**
178
+
179
+ You may want to run it to check code quality.
180
+
181
+ ```
182
+ npm run lint
183
+ ```
184
+
177
185
** Run all tests**
178
186
```
179
187
npm test
180
188
```
181
189
182
190
** Run tests by name**
183
191
```
184
- npm test -- -t 'LinkedList'
192
+ npm test -- 'LinkedList'
185
193
```
186
194
187
195
** Playground**
@@ -192,7 +200,7 @@ tests for it in `./src/playground/__test__/playground.test.js`.
192
200
Then just simply run the following command to test if your playground code works as expected:
193
201
194
202
```
195
- npm test -- -t 'playground'
203
+ npm test -- 'playground'
196
204
```
197
205
198
206
## Useful Information
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ npm test
147
147
148
148
** 按照名称执行测试**
149
149
```
150
- npm test -- -t 'LinkedList'
150
+ npm test -- 'LinkedList'
151
151
```
152
152
153
153
** Playground**
@@ -157,7 +157,7 @@ npm test -- -t 'LinkedList'
157
157
然后,只需运行以下命令来测试你的 Playground 是否按无误:
158
158
159
159
```
160
- npm test -- -t 'playground'
160
+ npm test -- 'playground'
161
161
```
162
162
163
163
## 有用的信息
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ npm test
145
145
146
146
** 以名稱執行該測試**
147
147
```
148
- npm test -- -t 'LinkedList'
148
+ npm test -- 'LinkedList'
149
149
```
150
150
** 練習場**
151
151
@@ -154,7 +154,7 @@ npm test -- -t 'LinkedList'
154
154
接著直接執行下列的指令來測試你練習的 code 是否如預期運作:
155
155
156
156
```
157
- npm test -- -t 'playground'
157
+ npm test -- 'playground'
158
158
```
159
159
160
160
## 有用的資訊
Original file line number Diff line number Diff line change 1
1
module . 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.
2
7
verbose : false ,
8
+
9
+ // Indicates whether the coverage information should be collected while executing the test
3
10
collectCoverage : false ,
11
+
12
+ // The directory where Jest should output its coverage files.
4
13
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?$' ,
5
23
} ;
You can’t perform that action at this time.
0 commit comments