Skip to content

Commit

Permalink
[eslint] update no-redeclare
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 26, 2021
1 parent ef0069a commit b03d4c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
6 changes: 2 additions & 4 deletions test/async-await.js
Expand Up @@ -238,15 +238,13 @@ tap.test('async-error', function (t) {
t.same(r.exitCode, 1);

var stderr = r.stderr.toString('utf8');
var lines = stderr.split('\n');
lines = lines.filter(function (line) {
var stderrLines = stderr.split('\n').filter(function (line) {
return !(/\(timers.js:/).test(line)
&& !(/\(internal\/timers.js:/).test(line)
&& !(/Immediate\.next/).test(line);
});
stderr = lines.join('\n');

t.same(stderr, '');
t.same(stderrLines.join('\n'), '');
t.end();
});
});
Expand Down
21 changes: 9 additions & 12 deletions test/stackTrace.js
Expand Up @@ -28,10 +28,9 @@ tap.test('preserves stack trace with newlines', function (tt) {
});

stream.pipe(concat(function (body) {
var body = body.toString('utf8');
body = stripAt(body);
var strippedBody = stripAt(body.toString('utf8'));
tt.equal(
body,
strippedBody,
'TAP version 13\n'
+ '# multiline stack trace\n'
+ 'not ok 1 Error: Preserve stack\n'
Expand All @@ -48,7 +47,7 @@ tap.test('preserves stack trace with newlines', function (tt) {
+ '# fail 1\n'
);

tt.deepEqual(getDiag(body), {
tt.deepEqual(getDiag(strippedBody), {
stack: stackTrace,
operator: 'error'
});
Expand Down Expand Up @@ -187,10 +186,9 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
});

stream.pipe(concat(function (body) {
var body = body.toString('utf8');
body = stripAt(body);
var strippedBody = stripAt(body.toString('utf8'));
tt.equal(
body,
strippedBody,
'TAP version 13\n'
+ '# t.equal stack trace\n'
+ 'not ok 1 true should be false\n'
Expand All @@ -209,7 +207,7 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
+ '# fail 1\n'
);

tt.deepEqual(getDiag(body), {
tt.deepEqual(getDiag(strippedBody), {
stack: stack,
operator: 'equal',
expected: false,
Expand Down Expand Up @@ -252,10 +250,9 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
});

stream.pipe(concat(function (body) {
var body = body.toString('utf8');
body = stripAt(body);
var strippedBody = stripAt(body.toString('utf8'));
tt.equal(
body,
strippedBody,
'TAP version 13\n'
+ '# t.equal stack trace\n'
+ 'not ok 1 false should be true\n'
Expand All @@ -274,7 +271,7 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
+ '# fail 1\n'
);

tt.deepEqual(getDiag(body), {
tt.deepEqual(getDiag(strippedBody), {
stack: stack,
operator: 'equal',
expected: true,
Expand Down

0 comments on commit b03d4c8

Please sign in to comment.