Skip to content

Commit

Permalink
Update Test262, Flow and TS parser tests (#10976)
Browse files Browse the repository at this point in the history
* Update Test262, Flow and TS parser tests

* Updates
  • Loading branch information
nicolo-ribaudo authored and JLHwung committed Jan 10, 2020
1 parent e8dac62 commit bfc56eb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
@@ -1,6 +1,6 @@
FLOW_COMMIT = 09669846b7a7ca5a6c23c12d56bb3bebdafd67e9
TEST262_COMMIT = 157b18d16b5d52501c4d75ac422d3a80bfad1c17
TYPESCRIPT_COMMIT = 038d95144d8b93c2799d1732181c89c3d84362d5
FLOW_COMMIT = a1f9a4c709dcebb27a5084acf47755fbae699c25
TEST262_COMMIT = 28b4fcca4b1b1d278dfe0cc0e69c7d9d59b31aab
TYPESCRIPT_COMMIT = 5fc917be2e4dd64c8e9504d36615cd7fbfdd4cd3

FORCE_PUBLISH = "@babel/runtime,@babel/runtime-corejs2,@babel/runtime-corejs3,@babel/standalone,@babel/preset-env-standalone"

Expand Down
6 changes: 5 additions & 1 deletion scripts/parser-tests/flow/index.js
Expand Up @@ -15,9 +15,11 @@ const flowOptionsMapping = {
};

function getPlugins(test) {
const flowOptions = { all: true };

const plugins = [
"dynamicImport",
["flow", { all: true }],
["flow", flowOptions],
"flowComments",
"jsx",
"classProperties",
Expand All @@ -33,6 +35,8 @@ function getPlugins(test) {
if (!enabled) {
const idx = plugins.indexOf(flowOptionsMapping[option]);
if (idx !== -1) plugins.splice(idx, 1);
} else if (option === "enums") {
flowOptions.enums = true;
} else if (!(option in flowOptionsMapping)) {
throw new Error("Parser options not mapped " + option);
} else if (flowOptionsMapping[option]) {
Expand Down
10 changes: 7 additions & 3 deletions scripts/parser-tests/flow/whitelist.txt
@@ -1,17 +1,21 @@
ES6/modules/export_default_class_implements.js
ES6/modules/migrated_0020.js
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_await/migrated_0007.js
async_await/migrated_0020.js
async_await/migrated_0024.js
async_await/migrated_0027.js
async_generators/migrated_0007.js
class_expression/anonymous_implements.js
class_method_kinds/polymorphic_getter.js
class_properties/migrated_0021.js
class_properties/migrated_0026.js
decorators/migrated_0003.js
export_import_reserved_words/migrated_0003.js
export_statements/export_trailing_comma.js
nullish_coalescing/precedence_and.js
nullish_coalescing/precedence_or.js
nullish_coalescing/missing-plugin.js
optional_chaining/missing-plugin.js
types/member/reserved_words.js
7 changes: 7 additions & 0 deletions scripts/parser-tests/typescript/whitelist.txt
Expand Up @@ -30,6 +30,7 @@ ambientWithStatements.ts
amdDeclarationEmitNoExtraDeclare.ts
amdModuleConstEnumUsage.ts
amdModuleName2.ts
anonClassDeclarationEmitIsAnon.ts
anyDeclare.ts
argumentsBindsToFunctionScopeArgumentList.ts
arrayOfExportedClass.ts
Expand Down Expand Up @@ -58,6 +59,7 @@ augmentedTypesEnum2.ts
augmentedTypesFunction.ts
augmentedTypesInterface.ts
augmentedTypesVar.ts
awaitInClassInAsyncFunction.ts
awaitInNonAsyncFunction.ts
awaitLiteralValues.ts
bigIntWithTargetES3.ts
Expand Down Expand Up @@ -103,6 +105,7 @@ constDeclarationShadowedByVarDeclaration.ts
constDeclarations-invalidContexts.ts
constDeclarations-scopes.ts
constDeclarations-validContexts.ts
constEnumNoEmitReexport.ts
constEnumNoPreserveDeclarationReexport.ts
constEnumPreserveEmitReexport.ts
constInClassExpression.ts
Expand Down Expand Up @@ -136,6 +139,7 @@ declarationEmitInterfaceWithNonEntityNameExpressionHeritage.ts
declarationEmitPrefersPathKindBasedOnBundling.ts
declarationEmitPrefersPathKindBasedOnBundling2.ts
declarationEmitPrivateSymbolCausesVarDeclarationEmit2.ts
declarationImportTypeAliasInferredAndEmittable.ts
declarationMapsMultifile.ts
declarationMapsOutFile.ts
declarationsForInferredTypeFromOtherFile.ts
Expand Down Expand Up @@ -319,6 +323,7 @@ jsFileCompilationExternalPackageError.ts
jsNoImplicitAnyNoCascadingReferenceErrors.ts
jsdocAccessEnumType.ts
jsxAttributeWithoutExpressionReact.tsx
jsxIntrinsicElementsExtendsRecord.tsx
letAndVarRedeclaration.ts
letAsIdentifier.ts
letAsIdentifierInStrictMode.ts
Expand Down Expand Up @@ -385,6 +390,7 @@ multipleClassPropertyModifiers.ts
multipleClassPropertyModifiersErrors.ts
multipleInheritance.ts
nameCollisions.ts
namespacesWithTypeAliasOnlyExportsMerge.ts
narrowedImports.ts
newNamesInGlobalAugmentations1.ts
noBundledEmitFromNodeModules.ts
Expand Down Expand Up @@ -414,6 +420,7 @@ parameterPropertyOutsideConstructor.ts
parseGenericArrowRatherThanLeftShift.ts
pathMappingBasedModuleResolution3_classic.ts
pathMappingBasedModuleResolution3_node.ts
preserveUnusedImports.ts
privacyCheckExternalModuleExportAssignmentOfGenericClass.ts
privacyImportParseErrors.ts
privacyTopLevelAmbientExternalModuleImportWithExport.ts
Expand Down

0 comments on commit bfc56eb

Please sign in to comment.