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