File tree 2 files changed +9
-11
lines changed
2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -225,13 +225,13 @@ not ok 1 test_add_no_numbers (tests.math_test.MathTest)
225
225
# AssertionError: 42 != 0 : Should return 0 with no params
226
226
1..1`
227
227
expect ( parser ( example ) ) . toEqual ( {
228
- ok : true ,
228
+ ok : false ,
229
229
passed : [ ] ,
230
230
failed : [
231
231
{
232
232
message : 'add no numbers' ,
233
233
details :
234
- 'Traceback (most recent call last):\n Fail Message\nAssertionError: 42 != 0 : Should return 0 with no params' ,
234
+ 'Traceback (most recent call last):\nFail Message\nAssertionError: 42 != 0 : Should return 0 with no params' ,
235
235
} ,
236
236
] ,
237
237
logs : [ ] ,
@@ -251,13 +251,13 @@ not ok 2 test_add_one_number (tests.math_test.MathTest)
251
251
1..2
252
252
`
253
253
expect ( parser ( example ) ) . toEqual ( {
254
- ok : true ,
254
+ ok : false ,
255
255
passed : [ { message : 'add no numbers' } ] ,
256
256
failed : [
257
257
{
258
258
message : 'add one number' ,
259
259
details :
260
- 'Traceback (most recent call last):\n Fail Message\nAssertionError: 2 != 1 : Should add one number to 0' ,
260
+ 'Traceback (most recent call last):\nFail Message\nAssertionError: 2 != 1 : Should add one number to 0' ,
261
261
} ,
262
262
] ,
263
263
logs : [ ] ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const r = {
23
23
start : / ^ ( n o t o k ) | ( o k ) / ,
24
24
fail : / ^ n o t o k (?< index > \d + ) \s ( \- \s ) ? (?< message > .+ ) $ / ,
25
25
pass : / ^ o k (?< index > \d + ) \s ( \- \s ) ? (?< message > .+ ) $ / ,
26
- details : / ^ # \s { 2 } (?< message > .+ ) $ / ,
26
+ details : / ^ # \s { 1 , 2 } (?< message > .+ ) $ / ,
27
27
ignore : / ^ ( 1 \. \. [ 0 - 9 ] + ) | ( # \s + ( t e s t s | p a s s | f a i l | s k i p ) \s + [ 0 - 9 ] + ) $ / ,
28
28
}
29
29
@@ -75,7 +75,7 @@ const parser = (text: string): ParserOutput => {
75
75
}
76
76
77
77
for ( const line of lines ) {
78
- if ( ! line . length ) {
78
+ if ( ! line . length || ! ! r . ignore . exec ( line ) ) {
79
79
continue
80
80
}
81
81
// be optimistic! check for success first
@@ -121,11 +121,9 @@ const parser = (text: string): ParserOutput => {
121
121
continue
122
122
}
123
123
124
- if ( ! r . ignore . exec ( line ) ) {
125
- // must be a log, associate with the next test
126
- logs . push ( line )
127
- result . logs . push ( line )
128
- }
124
+ // must be a log, associate with the next test
125
+ logs . push ( line )
126
+ result . logs . push ( line )
129
127
}
130
128
addCurrentDetails ( )
131
129
return result
You can’t perform that action at this time.
0 commit comments