Skip to content

Commit

Permalink
add test for visiting default value
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Aug 20, 2024
1 parent 2fff4bd commit 9de28dc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/utilities/__tests__/TypeInfo-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,10 @@ describe('visitWithTypeInfo', () => {
['leave', 'IntValue', null, 'QueryRoot', 'ID!'],
['leave', 'Argument', null, 'QueryRoot', 'ID!'],
['leave', 'FragmentSpread', null, 'QueryRoot', 'undefined'],
['enter', 'FragmentSpread', null, 'QueryRoot', 'undefined'],
['enter', 'Name', 'Bar', 'QueryRoot', 'undefined'],
['leave', 'Name', 'Bar', 'QueryRoot', 'undefined'],
['leave', 'FragmentSpread', null, 'QueryRoot', 'undefined'],
['leave', 'SelectionSet', null, 'QueryRoot', 'undefined'],
['leave', 'OperationDefinition', null, 'QueryRoot', 'undefined'],
['enter', 'FragmentDefinition', null, 'QueryRoot', 'undefined'],
Expand Down Expand Up @@ -629,7 +633,7 @@ describe('visitWithTypeInfo', () => {
const ast = parse(
`
query {
...Foo
...Foo(x: null)
}
fragment Foo(
$x: ID = 4
Expand Down Expand Up @@ -676,6 +680,12 @@ describe('visitWithTypeInfo', () => {
['enter', 'FragmentSpread', null, 'QueryRoot', 'undefined'],
['enter', 'Name', 'Foo', 'QueryRoot', 'undefined'],
['leave', 'Name', 'Foo', 'QueryRoot', 'undefined'],
['enter', 'Argument', null, 'QueryRoot', 'ID'],
['enter', 'Name', 'x', 'QueryRoot', 'ID'],
['leave', 'Name', 'x', 'QueryRoot', 'ID'],
['enter', 'NullValue', null, 'QueryRoot', 'ID'],
['leave', 'NullValue', null, 'QueryRoot', 'ID'],
['leave', 'Argument', null, 'QueryRoot', 'ID'],
['leave', 'FragmentSpread', null, 'QueryRoot', 'undefined'],
['leave', 'SelectionSet', null, 'QueryRoot', 'undefined'],
['leave', 'OperationDefinition', null, 'QueryRoot', 'undefined'],
Expand Down

0 comments on commit 9de28dc

Please sign in to comment.