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', { encoding: 'utf8' }); 10 const doc = parse(sink); 11 expect(doc).toMatchSnapshot(); 12 expect(doc).toEqual(graphql_parse(sink, { noLocation: true })); 13 }); 14});