Skip to content

Commit

Permalink
add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bboure authored and acao committed Aug 3, 2023
1 parent 4a72d6e commit e4a3d28
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ scalar Even
scalar SpecialScalar
scalar SpecialDate
scalar FooBar
scalar Foo

"""
An input type with custom scalars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ describe('getVariablesJSONSchema', () => {
$optionalSpecialDate: SpecialDate,
$foobar: FooBar!,
$optionalFoobar: FooBar,
$foo: Foo!,
$optionalFoo: Foo,
$customInput: CustomScalarsInput!,
$optionalCustomInput: CustomScalarsInput
) {
Expand Down Expand Up @@ -113,6 +115,9 @@ describe('getVariablesJSONSchema', () => {
FooBar: {
enum: ['foo', 'bar'],
},
Foo: {
const: 'foo',
},
SpecialDate: {
description: 'A date or date time.',
oneOf: [
Expand All @@ -135,6 +140,7 @@ describe('getVariablesJSONSchema', () => {
'special',
'specialDate',
'foobar',
'foo',
'customInput',
]);

Expand Down Expand Up @@ -197,6 +203,14 @@ describe('getVariablesJSONSchema', () => {
enum: ['foo', 'bar', null],
description: 'FooBar',
},
foo: {
const: 'foo',
description: 'Foo!',
},
optionalFoo: {
oneOf: [{ const: 'foo' }, { type: 'null' }],
description: 'Foo',
},
specialDate: {
description: 'SpecialDate!\nA date or date time.',
oneOf: [
Expand Down

0 comments on commit e4a3d28

Please sign in to comment.