Skip to content

Commit

Permalink
Update flow and ts parser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Feb 3, 2023
1 parent 8d6a659 commit bfa119e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Makefile
@@ -1,6 +1,6 @@
FLOW_COMMIT = 92bbb5e9dacb8185aa73ea343954d0434b42c40b
FLOW_COMMIT = a08ea9d3f8c382b43df85aada7a9c13d5dba8f61
TEST262_COMMIT = e7364ea7dc36a466edb2db5ef0a8e66da8dabb7d
TYPESCRIPT_COMMIT = ce85d647ef88183c019588bcf398320ce29b625a
TYPESCRIPT_COMMIT = 066c78d59094a9dc1c2cc147e668e95225ec427d

# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967
export FORCE_COLOR = true
Expand Down
27 changes: 17 additions & 10 deletions scripts/parser-tests/flow/allowlist.txt
@@ -1,20 +1,29 @@
ES6/modules/export_default_class_implements.js
ES6/modules/migrated_0020.js
# 12 invalid programs did not produce a parsing error

JSX/invalid_unpaired_gt.js
JSX/invalid_unpaired_rcurly.js
JSX_invalid/migrated_0000.js
arrow_function/object_return_type.js
arrow_function_invalid/migrated_0002.js
async_arrow_functions/with_type_parameters_types_disabled.js
class_method_kinds/polymorphic_getter.js
class_properties/migrated_0003.js
class_properties/migrated_0008.js
class_properties/migrated_0026.js
for_await_loops/migrated_0000.js
nullish_coalescing/missing-plugin.js
optional_chaining/missing-plugin.js


# 26 valid programs produced a parsing error

ES6/modules/export_default_class_implements.js
ES6/modules/migrated_0020.js
arrow_function/object_return_type.js
async_await/migrated_0020.js
async_await/migrated_0024.js
async_await/migrated_0027.js
class_expression/anonymous_implements.js
class_method_kinds/polymorphic_getter.js
class_properties/migrated_0003.js
class_properties/migrated_0008.js
class_properties/migrated_0021.js
class_properties/migrated_0026.js
comment_interning/class_method.js
comment_interning/class_property.js
comment_interning/declare_export_declaration.js
Expand All @@ -29,9 +38,7 @@ comment_interning/remove_type_trailing_comments.js
comment_interning/super.js
comment_interning/type_alias.js
decorators/migrated_0003.js
decorators/migrated_0005.js
export_import_reserved_words/migrated_0003.js
export_statements/export_trailing_comma.js
for_await_loops/migrated_0000.js
nullish_coalescing/missing-plugin.js
optional_chaining/missing-plugin.js
types/member/reserved_words.js
13 changes: 8 additions & 5 deletions scripts/parser-tests/typescript/allowlist.txt
@@ -1,7 +1,6 @@
# 9 invalid programs did not produce a parsing error
# 8 invalid programs did not produce a parsing error

bigintIndex.ts
classExpressionWithDecorator1.ts
collisionArgumentsArrowFunctions.ts # TypeScript doesn't allow a parameter to be named arguments even in non-strict mode, which we don't catch.
collisionArgumentsFunction.ts # TypeScript doesn't allow a parameter to be named arguments even in non-strict mode, which we don't catch.
collisionArgumentsFunctionExpressions.ts # TypeScript doesn't allow a parameter to be named arguments even in non-strict mode, which we don't catch.
Expand All @@ -11,7 +10,7 @@ exportDeclarationsInAmbientNamespaces2.ts
multipleExports.ts


# 131 valid programs produced a parsing error
# 135 valid programs produced a parsing error

ArrowFunctionExpression1.ts
MemberAccessorDeclaration15.ts
Expand Down Expand Up @@ -76,14 +75,13 @@ exportInterfaceClassAndValue.ts
exportSameNameFuncVar.ts
exportSpecifierForAGlobal.ts # We handle this fine, but it doesn't consider the different files together
exportSpecifierReferencingOuterDeclaration2.ts # We handle this fine, but it doesn't consider the different files together
expressionWithJSDocTypeArguments.ts
expressionsForbiddenInParameterInitializers.ts
extendsClauseAlreadySeen.ts
extendsClauseAlreadySeen2.ts
fileWithNextLine2.ts
funClodule.ts
functionCall15.ts
gettersAndSettersErrors.ts
giant.ts
implementClausePrecedingExtends.ts
implementsClauseAlreadySeen.ts
importAndVariableDeclarationConflict3.ts
Expand All @@ -99,6 +97,7 @@ indexerSignatureWithRestParam.ts
interfaceMayNotBeExtendedWitACall.ts
interfaceNaming1.ts # We correctly identify this error, but we can't bring it in without bringing a bunch of other tests too.
interfaceWithImplements1.ts
invalidOptionalChainFromNewExpression.ts
jsxAttributeMissingInitializer.tsx
jsxAttributeWithoutExpressionReact.tsx
letAndVarRedeclaration.ts
Expand All @@ -124,8 +123,11 @@ multipleInheritance.ts
nameCollisions.ts
noImplicitAnyDestructuringVarDeclaration.ts
nonMergedOverloads.ts
optionalChainWithInstantiationExpression1.ts
parameterInitializerBeforeDestructuringEmit.ts
parameterPropertyOutsideConstructor.ts
parseInvalidNonNullableTypes.ts
parseInvalidNullableTypes.ts
parserConstructorDeclaration12.ts
reExportGlobalDeclaration1.ts
reExportGlobalDeclaration2.ts # We handle this fine, but it doesn't consider the different files together
Expand All @@ -143,4 +145,5 @@ staticAsIdentifier.ts
staticModifierAlreadySeen.ts
strictOptionalProperties1.ts
superCallFromClassThatHasNoBaseType1.ts
unicodeEscapesInNames02.ts
varArgConstructorMemberParameter.ts

0 comments on commit bfa119e

Please sign in to comment.