@@ -28,10 +28,9 @@ tap.test('preserves stack trace with newlines', function (tt) {
28
28
} ) ;
29
29
30
30
stream . pipe ( concat ( function ( body ) {
31
- var body = body . toString ( 'utf8' ) ;
32
- body = stripAt ( body ) ;
31
+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
33
32
tt . equal (
34
- body ,
33
+ strippedBody ,
35
34
'TAP version 13\n'
36
35
+ '# multiline stack trace\n'
37
36
+ 'not ok 1 Error: Preserve stack\n'
@@ -48,7 +47,7 @@ tap.test('preserves stack trace with newlines', function (tt) {
48
47
+ '# fail 1\n'
49
48
) ;
50
49
51
- tt . deepEqual ( getDiag ( body ) , {
50
+ tt . deepEqual ( getDiag ( strippedBody ) , {
52
51
stack : stackTrace ,
53
52
operator : 'error'
54
53
} ) ;
@@ -187,10 +186,9 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
187
186
} ) ;
188
187
189
188
stream . pipe ( concat ( function ( body ) {
190
- var body = body . toString ( 'utf8' ) ;
191
- body = stripAt ( body ) ;
189
+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
192
190
tt . equal (
193
- body ,
191
+ strippedBody ,
194
192
'TAP version 13\n'
195
193
+ '# t.equal stack trace\n'
196
194
+ 'not ok 1 true should be false\n'
@@ -209,7 +207,7 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
209
207
+ '# fail 1\n'
210
208
) ;
211
209
212
- tt . deepEqual ( getDiag ( body ) , {
210
+ tt . deepEqual ( getDiag ( strippedBody ) , {
213
211
stack : stack ,
214
212
operator : 'equal' ,
215
213
expected : false ,
@@ -252,10 +250,9 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
252
250
} ) ;
253
251
254
252
stream . pipe ( concat ( function ( body ) {
255
- var body = body . toString ( 'utf8' ) ;
256
- body = stripAt ( body ) ;
253
+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
257
254
tt . equal (
258
- body ,
255
+ strippedBody ,
259
256
'TAP version 13\n'
260
257
+ '# t.equal stack trace\n'
261
258
+ 'not ok 1 false should be true\n'
@@ -274,7 +271,7 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
274
271
+ '# fail 1\n'
275
272
) ;
276
273
277
- tt . deepEqual ( getDiag ( body ) , {
274
+ tt . deepEqual ( getDiag ( strippedBody ) , {
278
275
stack : stack ,
279
276
operator : 'equal' ,
280
277
expected : true ,
0 commit comments