diff --git a/test/fetch/issue-2171.js b/test/fetch/issue-2171.js index 72770f3713f..cd4368b9d86 100644 --- a/test/fetch/issue-2171.js +++ b/test/fetch/issue-2171.js @@ -3,16 +3,17 @@ const { fetch } = require('../..') const { once } = require('events') const { createServer } = require('http') -const { test } = require('tap') +const { test } = require('node:test') +const assert = require('node:assert') test('error reason is forwarded - issue #2171', { skip: !AbortSignal.timeout }, async (t) => { const server = createServer(() => {}).listen(0) - t.teardown(server.close.bind(server)) + t.after(server.close.bind(server)) await once(server, 'listening') const timeout = AbortSignal.timeout(100) - await t.rejects( + await assert.rejects( fetch(`http://localhost:${server.address().port}`, { signal: timeout }),