Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 12, 2024
1 parent 65dfa31 commit 359d059
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/executors/http/tests/buildHTTPExecutor.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { setTimeout } from 'timers/promises';
import { createGraphQLError, fakePromise } from '@graphql-tools/utils';
import { createGraphQLError } from '@graphql-tools/utils';
import { assertAsyncIterable, createDisposableServer } from '@internal/testing';
import { Repeater } from '@repeaterjs/repeater';
import { DisposableSymbols } from '@whatwg-node/disposablestack';
Expand Down Expand Up @@ -262,17 +262,15 @@ describe('buildHTTPExecutor', () => {
fetch: () => Response.json({ data: { hello: 'world' } }),
});
executor[DisposableSymbols.asyncDispose]?.();
await expect(
fakePromise(
executor({
document: parse(/* GraphQL */ `
query {
hello
}
`),
}),
),
).resolves.toMatchObject({
expect(
executor({
document: parse(/* GraphQL */ `
query {
hello
}
`),
}),
).toMatchObject({
errors: [
createGraphQLError(
'The operation was aborted. reason: Error: Executor was disposed.',
Expand Down

0 comments on commit 359d059

Please sign in to comment.