From f013f18875b563813a6264e7aa889db171c7c113 Mon Sep 17 00:00:00 2001 From: Raynos Date: Thu, 20 Jun 2019 14:11:23 +0200 Subject: [PATCH] more version compat --- test/async-await.js | 4 +++- test/async-await/async4.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/async-await.js b/test/async-await.js index b4148d88..9bd5c6fd 100644 --- a/test/async-await.js +++ b/test/async-await.js @@ -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 ...]', ' ...', '', @@ -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') @@ -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') diff --git a/test/async-await/async4.js b/test/async-await/async4.js index 0effad82..9aa119a8 100644 --- a/test/async-await/async4.js +++ b/test/async-await/async4.js @@ -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) })