Skip to content

Commit 5944169

Browse files
committed
clarify test file comments
1 parent 49d958c commit 5944169

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/utilities/__tests__/TypeInfo-test.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ describe('visitWithTypeInfo', () => {
451451
['enter', 'ObjectField', null, '[String]'],
452452
['enter', 'Name', 'stringListField', '[String]'],
453453
['leave', 'Name', 'stringListField', '[String]'],
454-
['enter', 'ListValue', null, 'String' /* the item type, not list type */],
454+
['enter', 'ListValue', null, 'String'],
455455
['enter', 'StringValue', null, 'String'],
456456
['leave', 'StringValue', null, 'String'],
457-
['leave', 'ListValue', null, 'String' /* the item type, not list type */],
457+
['leave', 'ListValue', null, 'String'],
458458
['leave', 'ObjectField', null, '[String]'],
459459
['leave', 'ObjectValue', null, 'ComplexInput'],
460460
]);
@@ -519,7 +519,7 @@ describe('visitWithTypeInfo', () => {
519519
]);
520520
});
521521

522-
it('supports traversals of object literals of custom scalars', () => {
522+
it('supports traversals of object literals in custom scalar positions', () => {
523523
const schema = buildSchema(`
524524
scalar GeoPoint
525525
`);
@@ -556,7 +556,7 @@ describe('visitWithTypeInfo', () => {
556556

557557
expect(visited).to.deep.equal([
558558
// Everything within ObjectValue should have type: undefined since the
559-
// contents of custom scalars aren't part of GraphQL schema definitions.
559+
// contents of custom scalars are not part of the GraphQL type system.
560560
['enter', 'ObjectValue', null, 'GeoPoint'],
561561
['enter', 'ObjectField', null, 'undefined'],
562562
['enter', 'Name', 'x', 'undefined'],
@@ -574,7 +574,7 @@ describe('visitWithTypeInfo', () => {
574574
]);
575575
});
576576

577-
it('supports traversals of list literals of custom scalars', () => {
577+
it('supports traversals of list literals in custom scalar positions', () => {
578578
const schema = buildSchema(`
579579
scalar GeoPoint
580580
`);
@@ -610,6 +610,9 @@ describe('visitWithTypeInfo', () => {
610610
);
611611

612612
expect(visited).to.deep.equal([
613+
// Everything including ListValue should have type: undefined since the
614+
// contents of custom scalars are not part of the GraphQL type system.
615+
// ListValues carry the item type, so the item type is also undefined.
613616
['enter', 'ListValue', null, 'undefined'],
614617
['enter', 'FloatValue', null, 'undefined'],
615618
['leave', 'FloatValue', null, 'undefined'],

0 commit comments

Comments
 (0)