Skip to content

Migrate test-host.ts to createTester framework#68

Open
FionaBronwen wants to merge 1 commit intofionabronwen/graphql-mutation-engine-v2from
fionabronwen/graphql-migrate-test-host
Open

Migrate test-host.ts to createTester framework#68
FionaBronwen wants to merge 1 commit intofionabronwen/graphql-mutation-engine-v2from
fionabronwen/graphql-migrate-test-host

Conversation

@FionaBronwen
Copy link

Replace the legacy createTestHost/createTestWrapper testing setup with the createTester API
introduced in microsoft#7151.

Changes

  • test-host.ts: Replace createTestHost/createTestWrapper with createTester and EmitterTester. Use
    compileAndDiagnose with result.outputs instead of manually reading from the test filesystem. Remove
    unused standalone diagnose and compileAndDiagnose helper functions.
  • src/testing/index.ts: Delete GraphQLTestLibrary. createTester resolves libraries by package name and does not need a TypeSpecTestLibrary` object.
  • package.json: Remove the ./testing export (no longer has a source file).

What's preserved

The public test API (Tester, EmitterTester, emitSingleSchema, emitSingleSchemaWithDiagnostics,
emitWithDiagnostics, GraphQLTestResult) is unchanged. No test files required modifications.

@FionaBronwen FionaBronwen marked this pull request as ready for review March 10, 2026 19:51
@FionaBronwen FionaBronwen removed the request for review from swatkatz March 10, 2026 19:51
@FionaBronwen FionaBronwen force-pushed the fionabronwen/graphql-mutation-engine-v2 branch from 70e7589 to 84b7764 Compare March 13, 2026 18:53
@FionaBronwen FionaBronwen force-pushed the fionabronwen/graphql-migrate-test-host branch from ebc0664 to f3377f1 Compare March 13, 2026 18:56
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.

1 participant