Skip to content

Commit

Permalink
more version compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos committed Jun 20, 2019
1 parent a31f58d commit f013f18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ tap.test('async4', function (t) {
' at: Test.myTest ($TEST/async-await/async4.js:$LINE:$COL)',
' stack: |-',
' Error: oops',
' at Timeout.setTimeout [as _onTimeout] ($TEST/async-await/async4.js:$LINE:$COL)',
' at Timeout.myTimeout [as _onTimeout] ($TEST/async-await/async4.js:$LINE:$COL)',
' [... stack stripped ...]',
' ...',
'',
Expand Down Expand Up @@ -133,6 +133,7 @@ tap.test('sync-error', function (t) {
var lines = stderr.split('\n')
lines = lines.filter(function (line) {
return ! /\(timers.js:/.test(line) &&
! /\(internal\/timers.js:/.test(line) &&
! /Immediate\.next/.test(line)
})
stderr = lines.join('\n')
Expand Down Expand Up @@ -167,6 +168,7 @@ tap.test('async-error', function (t) {
var lines = stderr.split('\n')
lines = lines.filter(function (line) {
return ! /\(timers.js:/.test(line) &&
! /\(internal\/timers.js:/.test(line) &&
! /Immediate\.next/.test(line)
})
stderr = lines.join('\n')
Expand Down
2 changes: 1 addition & 1 deletion test/async-await/async4.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test('async4', async function myTest(t) {
try {
t.ok(true, 'before await')
await new Promise((resolve, reject) => {
setTimeout(() => {
setTimeout(function myTimeout() {
reject(new Error('oops'))
}, 10)
})
Expand Down

0 comments on commit f013f18

Please sign in to comment.