-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test: Allow multiple parsers in error test (#9648)
- Loading branch information
Showing
16 changed files
with
111 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
run_spec(__dirname, ["babel-flow"]); | ||
run_spec(__dirname, ["babel"]); | ||
run_spec(__dirname, ["babel-flow", "babel"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`snippet: #0 error test 1`] = `"Comment \\"comment\\" was not printed. Please report this error!"`; | ||
exports[`snippet: #0 [missing-comments] format 1`] = `"Comment \\"comment\\" was not printed. Please report this error!"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 13 additions & 13 deletions
26
tests/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`snippet: #0 error test 1`] = ` | ||
exports[`snippet: #0 [babel] format 1`] = ` | ||
"Unexpected token, expected \\"(\\" (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^" | ||
`; | ||
|
||
exports[`snippet: #0 error test 2`] = ` | ||
"Unexpected identifier, expected the token \`(\` (1:5) | ||
exports[`snippet: #0 [babel-flow] format 1`] = ` | ||
"Unexpected token, expected \\"(\\" (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^^^^" | ||
| ^" | ||
`; | ||
|
||
exports[`snippet: #0 error test 3`] = ` | ||
"'(' expected. (1:5) | ||
exports[`snippet: #0 [babel-ts] format 1`] = ` | ||
"Unexpected token, expected \\"(\\" (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^" | ||
`; | ||
|
||
exports[`snippet: #0 error test 4`] = ` | ||
"Unexpected token, expected \\"(\\" (1:5) | ||
exports[`snippet: #0 [espree] format 1`] = ` | ||
"Unexpected token each (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^" | ||
`; | ||
|
||
exports[`snippet: #0 error test 5`] = ` | ||
"Unexpected token, expected \\"(\\" (1:5) | ||
exports[`snippet: #0 [flow] format 1`] = ` | ||
"Unexpected identifier, expected the token \`(\` (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^" | ||
| ^^^^" | ||
`; | ||
|
||
exports[`snippet: #0 error test 6`] = ` | ||
"Unexpected token each (1:5) | ||
exports[`snippet: #0 [typescript] format 1`] = ` | ||
"'(' expected. (1:5) | ||
> 1 | for each (a in b) {} | ||
| ^" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
for (const parser of [ | ||
"babel", | ||
"flow", | ||
"typescript", | ||
"babel-flow", | ||
"babel-ts", | ||
"espree", | ||
]) { | ||
run_spec( | ||
{ | ||
dirname: __dirname, | ||
snippets: ["for each (a in b) {}"], | ||
}, | ||
[parser] | ||
); | ||
} | ||
run_spec( | ||
{ | ||
dirname: __dirname, | ||
snippets: ["for each (a in b) {}"], | ||
}, | ||
["babel", "flow", "typescript", "babel-flow", "babel-ts", "espree"] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.