Mirror: The spec-compliant minimum of client-side GraphQL.
1import { describe, it, expect } from 'vitest';
2import { readFileSync } from 'fs';
3
4import { parse as graphql_parse } from 'graphql';
5import { parse } from '../parser';
6
7describe('print', () => {
8 it('prints the kitchen sink document like graphql.js does', () => {
9 const sink = readFileSync(__dirname + '/../../benchmark/kitchen_sink.graphql', {
10 encoding: 'utf8',
11 });
12 const doc = parse(sink);
13 expect(doc).toMatchSnapshot();
14 expect(doc).toEqual(graphql_parse(sink, { noLocation: true }));
15 });
16});