Skip to content

Commit

Permalink
test(typescript-estree): add tests for instantiation expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed May 9, 2022
1 parent 9fe1629 commit f8d2bfc
Show file tree
Hide file tree
Showing 5 changed files with 4,676 additions and 0 deletions.
@@ -0,0 +1,7 @@
a<b>;

(a<b>)<c>;
(a<b>)<c>();
(a<b>)<c>?.();
(a?.b<c>)<d>();
new (a<b>)<c>();
Expand Up @@ -451,6 +451,13 @@ tester.addFixturePatternConfig('typescript/decorators/property-decorators', {

tester.addFixturePatternConfig('typescript/expressions', {
fileType: 'ts',
ignore: [
/**
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
* Babel doesn't support TS 4.7 new features yet.
*/
'instantiation-expression',
],
});

tester.addFixturePatternConfig('typescript/errorRecovery', {
Expand Down
Expand Up @@ -2640,6 +2640,8 @@ TSError {

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/instantiation-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/new-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/optional-call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;
Expand Down

0 comments on commit f8d2bfc

Please sign in to comment.