diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f8ae0983..66eea798 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "20.11.0" cache: "yarn" - run: yarn install --immutable - run: yarn workspaces foreach --all --include "@apollo/*" add -D -P @apollo/client@${{ matrix.version }} diff --git a/packages/client-react-streaming/src/AccumulateMultipartResponsesLink.test.ts b/packages/client-react-streaming/src/AccumulateMultipartResponsesLink.test.ts index 5df1f453..2b5473f9 100644 --- a/packages/client-react-streaming/src/AccumulateMultipartResponsesLink.test.ts +++ b/packages/client-react-streaming/src/AccumulateMultipartResponsesLink.test.ts @@ -10,14 +10,11 @@ import { test, mock } from "node:test"; import assert from "node:assert"; import { fromPartial } from "@total-typescript/shoehorn"; import type { SubscriptionObserver } from "zen-observable-ts"; -import { runInConditions } from "./util/runInConditions.js"; - -runInConditions("node", "browser"); const { DebounceMultipartResponsesLink: AccumulateMultipartResponsesLink } = await import("#bundled"); -test("normal queries can resolve synchronously", () => { +await test("normal queries can resolve synchronously", () => { const query = gql` query { fastField @@ -49,7 +46,7 @@ test("normal queries can resolve synchronously", () => { }); }); -test("deferred query will complete synchonously if maxDelay is 0", () => { +await test("deferred query will complete synchonously if maxDelay is 0", () => { const query = gql` query { fastField @@ -84,7 +81,7 @@ test("deferred query will complete synchonously if maxDelay is 0", () => { }); }); -test("`next` call will be debounced and results will be merged together", () => { +await test("`next` call will be debounced and results will be merged together", () => { mock.timers.enable(); const query = gql` diff --git a/packages/client-react-streaming/src/RemoveMultipartDirectivesLink.test.ts b/packages/client-react-streaming/src/RemoveMultipartDirectivesLink.test.ts index 68f6f784..02a6adc0 100644 --- a/packages/client-react-streaming/src/RemoveMultipartDirectivesLink.test.ts +++ b/packages/client-react-streaming/src/RemoveMultipartDirectivesLink.test.ts @@ -5,9 +5,6 @@ import { gql, Observable } from "@apollo/client/core/index.js"; import { print } from "graphql"; import { it } from "node:test"; import assert from "node:assert"; -import { runInConditions } from "./util/runInConditions.js"; - -runInConditions("node", "browser"); const { RemoveMultipartDirectivesLink } = await import("#bundled"); @@ -51,7 +48,7 @@ const queryWithDeferAndStripAnnotation = gql` } `; -it("removes fields with a @defer directive", () => { +await it("removes fields with a @defer directive", () => { const link = new RemoveMultipartDirectivesLink({ stripDefer: true, }); @@ -69,7 +66,7 @@ query myQuery { ); }); -it("`stripDefer` defaults to `true`", () => { +await it("`stripDefer` defaults to `true`", () => { const link = new RemoveMultipartDirectivesLink({ stripDefer: true, }); @@ -87,7 +84,7 @@ query myQuery { ); }); -it("preserves @defer fields with a `SsrDontStrip` label", () => { +await it("preserves @defer fields with a `SsrDontStrip` label", () => { const link = new RemoveMultipartDirectivesLink({ stripDefer: true, }); @@ -114,7 +111,7 @@ query myQuery { ); }); -it("can be configured to not remove @defer fields", () => { +await it("can be configured to not remove @defer fields", () => { const link = new RemoveMultipartDirectivesLink({ stripDefer: false, }); @@ -138,7 +135,7 @@ query myQuery { ); }); -it("even with `stripDefer: false`, certain fields can be marked for stripping", () => { +await it("even with `stripDefer: false`, certain fields can be marked for stripping", () => { const link = new RemoveMultipartDirectivesLink({ stripDefer: false, });