mirror of
https://github.com/expo/apollo-codegen.git
synced 2026-11-15 03:28:06 -10:00
17 lines
425 B
JavaScript
17 lines
425 B
JavaScript
import { readFileSync } from 'fs';
|
|
import * as path from 'path';
|
|
|
|
import { loadAndMergeQueryDocuments } from '../src/loading';
|
|
|
|
describe('Validation', () => {
|
|
test(`should extract gql snippet from javascript file`, () => {
|
|
const inputPaths = [
|
|
path.join(__dirname, './starwars/gqlQueries.js'),
|
|
];
|
|
|
|
const document = loadAndMergeQueryDocuments(inputPaths);
|
|
|
|
expect(document).toMatchSnapshot();
|
|
})
|
|
});
|