Skip to content

Commit

Permalink
work around one weird test
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Nov 28, 2024
1 parent 1d0c877 commit f02f1a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/testing/experimental/__tests__/createTestSchema.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
userEventWithoutAct,
} from "@testing-library/react-render-stream";

const IS_REACT_19 = React.version.startsWith("19");

const typeDefs = /* GraphQL */ `
type User {
id: ID!
Expand Down Expand Up @@ -1212,13 +1214,20 @@ describe("schema proxy", () => {
return <div>Hello</div>;
};

renderStream.render(<App />, {
await renderStream.render(<App />, {
wrapper: createClientWrapper(client),
});

// initial suspended render
await renderStream.takeRender();

if (IS_REACT_19) {
// not sure why we have this additional commit
expect((await renderStream.takeRender()).snapshot).toStrictEqual({
result: null,
});
}

await expect(renderStream).not.toRerender({ timeout: minDelay - 100 });

{
Expand Down

0 comments on commit f02f1a2

Please sign in to comment.