Skip to content

Commit

Permalink
Update test262 filters
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Oct 1, 2018
1 parent 94d5987 commit d4d7d3b
Show file tree
Hide file tree
Showing 2 changed files with 395 additions and 9 deletions.
16 changes: 7 additions & 9 deletions run_test262.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ const acorn = require("acorn")
const stage3 = require(".")
const Parser = acorn.Parser.extend(stage3)

const unsupportedFeatures = []

const implementedFeatures = [
"BigInt",
"class-fields-private",
"class-fields-public",
"dynamic-import", // https://github.com/tc39/test262/issues/1164
"import-meta", // https://github.com/tc39/test262/issues/1342
const unsupportedFeatures = [
"class-static-fields-private",
"class-static-fields-public",
"class-static-methods-private",
"export-star-as-namespace-from-module",
"numeric-separator-literal"
]

run(
(content, options) => Parser.parse(content, {sourceType: options.sourceType, ecmaVersion: 10}),
{
testsDirectory: path.dirname(require.resolve("test262/package.json")),
skip: test => (!test.attrs.features || !implementedFeatures.some(f => test.attrs.features.includes(f)) || unsupportedFeatures.some(f => test.attrs.features.includes(f))),
skip: test => (test.attrs.features && unsupportedFeatures.some(f => test.attrs.features.includes(f))),
whitelist: fs.readFileSync("./test262.whitelist", "utf8").split("\n").filter(v => v && v[0] !== "#")
}
)
Loading

0 comments on commit d4d7d3b

Please sign in to comment.