Skip to content

Commit 7363d2a

Browse files
committed
test: Add test for parserOptions without plugins
1 parent 000ce0a commit 7363d2a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/__tests__/parse-test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('parse', () => {
7373
}
7474
});
7575

76-
it('supports custom parserOptions', () => {
76+
it('supports custom parserOptions with plugins', () => {
7777
expect(() =>
7878
parse('const chained: Type = 1;', () => {}, null, {
7979
parserOptions: {
@@ -85,4 +85,14 @@ describe('parse', () => {
8585
}),
8686
).toThrowError(/.*Unexpected token \(1:13\).*/);
8787
});
88+
89+
it('supports custom parserOptions without plugins', () => {
90+
expect(() =>
91+
parse('const chained: Type = 1;', () => {}, null, {
92+
parserOptions: {
93+
allowSuperOutsideMethod: true,
94+
},
95+
}),
96+
).toThrowError(ERROR_MISSING_DEFINITION);
97+
});
8898
});

0 commit comments

Comments
 (0)