Skip to content

Commit

Permalink
ensure indent is covered
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Jul 7, 2021
1 parent ce9c398 commit eecdffc
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions packages/loaders/code-file/tests/load-from-code-file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,39 @@ describe('loadFromCodeFileSync', () => {
it('should support loading many in same file', () => {
const loaded = loader.loadSync('./test-files/multiple-from-file.ts', {
cwd: __dirname,
pluckConfig: {
skipIndent: true,
},
});
expect(loaded?.length).toEqual(3);
expect(loaded?.[0].rawSDL).toBeDefined();
expect(loaded?.[0].rawSDL).toMatchInlineSnapshot(`
"query Foo {
Tweets {
id
"
query Foo {
Tweets {
id
}
}
}"
"
`);
expect(loaded?.[1].rawSDL).toBeDefined();
expect(loaded?.[1].rawSDL).toMatchInlineSnapshot(`
"fragment Lel on Tweet {
id
body
}"
`);
"
fragment Lel on Tweet {
id
body
}
"
`);
expect(loaded?.[2].rawSDL).toBeDefined();
expect(loaded?.[2].rawSDL).toMatchInlineSnapshot(`
"query Bar {
Tweets {
...Lel
}
}"
`);
"
query Bar {
Tweets {
...Lel
}
}
"
`);
});
});

0 comments on commit eecdffc

Please sign in to comment.