Skip to content

Commit

Permalink
Prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
esquevin authored and Guillaume Esquevin committed Jul 18, 2023
1 parent 4e015d1 commit 948c569
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,27 @@ describe('MergeAst', () => {
it('preserve directives on fragments', () => {
const query = /* GraphQL */ `
query Test($param: Boolean!) {
...Fragment1 @include(if: $param)
...Fragment1 @include(if: $param)
}
fragment Fragment1 on Test {
id
}`;
}
`;
const mergedQuery = stripWhitespace(/* GraphQL */ `
query Test($param: Boolean!) {
...on Test @include(if: $param) {
... on Test @include(if: $param) {
id
}
}`);
}
`);
const mergedQueryWithSchema = stripWhitespace(/* GraphQL */ `
query Test($param: Boolean!) {
...on Test @include(if: $param) {
... on Test @include(if: $param) {
id
}
}`);
}
`);
expect(parseMergeAndPrint(query)).toBe(mergedQuery);
expect(parseMergeAndPrint(query, schema)).toBe(mergedQueryWithSchema);
});
Expand Down

0 comments on commit 948c569

Please sign in to comment.