diff --git a/tests/format/flow/generic/arrows.js b/tests/format/flow/generic/arrows.js new file mode 100644 index 000000000000..11885587667e --- /dev/null +++ b/tests/format/flow/generic/arrows.js @@ -0,0 +1 @@ +(a => b); diff --git a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap index 770a98581a6e..f3a74f0d3dd0 100644 --- a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap @@ -17,3 +17,17 @@ exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` | ^ 4 |" `; + +exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = ` +"Unterminated JSX contents. (1:4) +> 1 | (a => b); + | ^ + 2 |" +`; + +exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = ` +"Unterminated JSX contents. (1:4) +> 1 | (a => b); + | ^ + 2 |" +`; diff --git a/tests/format/misc/errors/babel-flow/wrong-arrow-no-parens-jsx.js b/tests/format/misc/errors/babel-flow/wrong-arrow-no-parens-jsx.js new file mode 100644 index 000000000000..11885587667e --- /dev/null +++ b/tests/format/misc/errors/babel-flow/wrong-arrow-no-parens-jsx.js @@ -0,0 +1 @@ +(a => b);