Update Test262, Flow and TS parser tests (#10976)
* Update Test262, Flow and TS parser tests * Updates
This commit is contained in:
committed by
Huáng Jùnliàng
parent
e8dac621de
commit
bfc56ebbab
@@ -15,9 +15,11 @@ const flowOptionsMapping = {
|
||||
};
|
||||
|
||||
function getPlugins(test) {
|
||||
const flowOptions = { all: true };
|
||||
|
||||
const plugins = [
|
||||
"dynamicImport",
|
||||
["flow", { all: true }],
|
||||
["flow", flowOptions],
|
||||
"flowComments",
|
||||
"jsx",
|
||||
"classProperties",
|
||||
@@ -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]) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user