Skip to content

Commit 2246333

Browse files
authored
chore(tests): add test for directive extensions without flag enabled (#4738) (#4739)
frontport #4738
1 parent b851cb9 commit 2246333

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/language/__tests__/schema-parser-test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,13 @@ input Hello {
10971097
});
10981098
});
10991099

1100+
it('Directive definition extensions require the experimental flag', () => {
1101+
expectToThrowJSON(() => parse('extend directive @foo @bar')).to.deep.equal({
1102+
message: 'Syntax Error: Unexpected Name "directive".',
1103+
locations: [{ line: 1, column: 8 }],
1104+
});
1105+
});
1106+
11001107
it('Directive with incorrect locations', () => {
11011108
expectSyntaxError(
11021109
'directive @foo on FIELD | INCORRECT_LOCATION',

0 commit comments

Comments
 (0)