@@ -28,10 +28,9 @@ tap.test('preserves stack trace with newlines', function (tt) {
2828 } ) ;
2929
3030 stream . pipe ( concat ( function ( body ) {
31- var body = body . toString ( 'utf8' ) ;
32- body = stripAt ( body ) ;
31+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
3332 tt . equal (
34- body ,
33+ strippedBody ,
3534 'TAP version 13\n'
3635 + '# multiline stack trace\n'
3736 + 'not ok 1 Error: Preserve stack\n'
@@ -48,7 +47,7 @@ tap.test('preserves stack trace with newlines', function (tt) {
4847 + '# fail 1\n'
4948 ) ;
5049
51- tt . deepEqual ( getDiag ( body ) , {
50+ tt . deepEqual ( getDiag ( strippedBody ) , {
5251 stack : stackTrace ,
5352 operator : 'error'
5453 } ) ;
@@ -187,10 +186,9 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
187186 } ) ;
188187
189188 stream . pipe ( concat ( function ( body ) {
190- var body = body . toString ( 'utf8' ) ;
191- body = stripAt ( body ) ;
189+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
192190 tt . equal (
193- body ,
191+ strippedBody ,
194192 'TAP version 13\n'
195193 + '# t.equal stack trace\n'
196194 + 'not ok 1 true should be false\n'
@@ -209,7 +207,7 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
209207 + '# fail 1\n'
210208 ) ;
211209
212- tt . deepEqual ( getDiag ( body ) , {
210+ tt . deepEqual ( getDiag ( strippedBody ) , {
213211 stack : stack ,
214212 operator : 'equal' ,
215213 expected : false ,
@@ -252,10 +250,9 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
252250 } ) ;
253251
254252 stream . pipe ( concat ( function ( body ) {
255- var body = body . toString ( 'utf8' ) ;
256- body = stripAt ( body ) ;
253+ var strippedBody = stripAt ( body . toString ( 'utf8' ) ) ;
257254 tt . equal (
258- body ,
255+ strippedBody ,
259256 'TAP version 13\n'
260257 + '# t.equal stack trace\n'
261258 + 'not ok 1 false should be true\n'
@@ -274,7 +271,7 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
274271 + '# fail 1\n'
275272 ) ;
276273
277- tt . deepEqual ( getDiag ( body ) , {
274+ tt . deepEqual ( getDiag ( strippedBody ) , {
278275 stack : stack ,
279276 operator : 'equal' ,
280277 expected : true ,
0 commit comments