Skip to content

Conversation

@NatLeung96
Copy link
Collaborator

AP-948: add tests for query component

Comment on lines +9 to +16
vi.mock("react-relay", async () => {
const actual = await vi.importActual("react-relay");
return {
...actual,
RelayEnvironmentProvider: actual.RelayEnvironmentProvider,
useLazyLoadQuery: vi.fn(),
};
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could create a helper function for mocking to use in all tests where you pass the name of hooks to mock e.g.
mockRelay(["useLazyLoadQuery", "useFragment"]);

@NatLeung96 NatLeung96 force-pushed the nl/add-test-for-retriggerworkflow branch 2 times, most recently from 88b34b7 to effe2da Compare November 11, 2025 16:34
@NatLeung96 NatLeung96 force-pushed the nl/add-test-for-retriggerworkflow branch from effe2da to 5979b79 Compare November 11, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants