Commit 01f7780
committed
CLI: Fix TAP compliance for early errors (e.g. syntax error in test file)
Cherry-picked from 62ca15a (3.0.0-dev).
> Core: Convert "No tests were run." from fake test to error
Early errors produced output like so:
```
not ok 1 global failure
---
message: ReferenceError: boom is not defined
stack: |
ReferenceError: boom is not defined
at /example.test.js
...
Bail out! ReferenceError: boom is not defined
TAP version 13
1..1
```
Instead of:
```
TAP version 13
not ok 1 global failure
---
message: ReferenceError: boom is not defined
stack: |
ReferenceError: boom is not defined
at /example.test.js
...
Bail out! ReferenceError: boom is not defined
1..1
```
Because prior to the introduction of the "error" event in 2.17.0,
the only failures were test failures, and those would not begin until
after QUnit.begin() / "runStart" event.1 parent b4d48fc commit 01f7780
File tree
4 files changed
+17
-5
lines changed- src/reporters
- test/cli
- fixtures
4 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| 217 | + | |
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
0 commit comments