graphql-request
Version:
Minimal GraphQL client supporting Node and browsers for scripts or simple apps.
33 lines (31 loc) • 1.02 kB
text/typescript
import { readFile } from 'fs/promises'
import { expect, test } from 'vitest'
test(`schema2`, async () => {
expect(
await readFile(`./tests/_/schema/generated/Client.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/__.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/_.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/Error.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/Select.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/Index.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/SchemaBuildtime.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/Scalar.ts`, `utf8`),
).toMatchSnapshot()
expect(
await readFile(`./tests/_/schema/generated/SchemaRuntime.ts`, `utf8`),
).toMatchSnapshot()
})