Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix failing tests #2097

Merged
merged 9 commits into from
May 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: fixes
  • Loading branch information
KhafraDev committed Apr 26, 2023
commit 88befe91ea702eedf844f8818364147adf0de3ed
12 changes: 8 additions & 4 deletions test/fetch/jsdom-abortcontroller-1910-1464495619.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ const { JSDOM } = require('jsdom')
test('third party AbortControllers', async (t) => {
const server = createServer((_, res) => res.end()).listen(0)

t.teardown(server.close.bind(server))
await once(server, 'listening')

const { AbortController } = new JSDOM().window
const controller = new AbortController()
let controller = new AbortController()

t.teardown(() => {
controller.abort()
controller = null
return server.close()
})
await once(server, 'listening')

await t.resolves(fetch(`http:https://localhost:${server.address().port}`, {
signal: controller.signal
Expand Down