From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/acorn/bin/run_test262.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 node_modules/acorn/bin/run_test262.js (limited to 'node_modules/acorn/bin/run_test262.js') diff --git a/node_modules/acorn/bin/run_test262.js b/node_modules/acorn/bin/run_test262.js new file mode 100644 index 00000000..150429a1 --- /dev/null +++ b/node_modules/acorn/bin/run_test262.js @@ -0,0 +1,21 @@ +const fs = require("fs") +const path = require("path") +const run = require("test262-parser-runner") +const parse = require("..").parse + +const unsupportedFeatures = [ + "BigInt", + "class-fields", + "class-fields-private", + "class-fields-public", + "numeric-separator-literal" +]; + +run( + (content, {sourceType}) => parse(content, {sourceType, ecmaVersion: 10}), + { + testsDirectory: path.dirname(require.resolve("test262/package.json")), + skip: test => (test.attrs.features && unsupportedFeatures.some(f => test.attrs.features.includes(f))), + whitelist: fs.readFileSync("./bin/test262.whitelist", "utf8").split("\n").filter(v => v) + } +) -- cgit v1.2.3