Skip to content

Commit

Permalink
Add unstable AST testing for json-stringify parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Mar 4, 2021
1 parent 37aa31e commit c22bea4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@angular/compiler": "11.2.3",
"@babel/code-frame": "7.12.13",
"@babel/parser": "7.13.4",
"@babel/parser": "7.13.9",
"@glimmer/syntax": "0.77.1",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "4.15.2",
Expand Down
13 changes: 6 additions & 7 deletions tests_config/run_spec.js
Expand Up @@ -47,19 +47,18 @@ const unstableTests = new Map(
})
);

// This is temporary.
// This will be removed once https://github.com/babel/babel/issues/12915 is fixed
const unstableAstTests = new Map(
[
[
"flow/function-parentheses/single.js",
(options) =>
options.parser.startsWith("babel") && options.arrowParens !== "avoid",
"json/json/propertyKey.json",
(options) => options.parser === "json-stringify",
],
[
"flow/function-parentheses/test.js",
(options) => options.parser.startsWith("babel"),
"json/json/positive-number.json",
(options) => options.parser === "json-stringify",
],
["json/json/json5.json", (options) => options.parser === "json-stringify"],
["json/json/array.json", (options) => options.parser === "json-stringify"],
].map((fixture) => {
const [file, isUnstable = () => true] = Array.isArray(fixture)
? fixture
Expand Down
8 changes: 7 additions & 1 deletion yarn.lock
Expand Up @@ -283,7 +283,12 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/parser@7.13.4", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4":
"@babel/parser@7.13.9":
version "7.13.9"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99"
integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==

"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4":
version "7.13.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab"
integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA==
Expand Down Expand Up @@ -3039,6 +3044,7 @@ eslint-plugin-jest@24.1.5:

"eslint-plugin-prettier-internal-rules@link:scripts/tools/eslint-plugin-prettier-internal-rules":
version "0.0.0"
uid ""

eslint-plugin-react@7.22.0:
version "7.22.0"
Expand Down

0 comments on commit c22bea4

Please sign in to comment.