Labsco
facebook logo

relay-e2e-test

โœ“ Officialโ˜… 18,946

by facebook ยท part of facebook/relay

Write and run markdown-driven e2e tests for Relay. Covers fixture format, server/client code patterns, interaction DSL, snapshots, and running tests.

๐Ÿงฐ Not standalone. This skill ships with facebook/relay and only works together with that tool โ€” install the tool first, then add this skill.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

Relay E2E Tests

Markdown-driven end-to-end tests for Relay. Each test is a self-contained .md file that defines a GraphQL server (via Grats), a Relay-powered React component, and optional interaction steps. The test harness extracts the code blocks, compiles them with Grats + relay-compiler, renders with React Testing Library, runs interactions, and snapshot-tests the output.

Tests run against Relay runtime packages from source, so changes are reflected immediately without a build step.

References

Read the appropriate reference file based on your task:

  • Writing fixtures โ€” fixture format, example, server/client code patterns, interaction DSL, snapshots. Read when creating or modifying test fixtures.
  • Running tests (internal) โ€” setup, commands, and compiler resolution for fbsource / OD. Read when running tests internally.
  • Running tests (GitHub) โ€” setup, commands, and compiler resolution for the OSS repo. Read when running tests on GitHub.