* block */
+ 5 | /a>;"
+`;
+
exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = `
"Identifier expected. (2:6)
1 | /* =========== before slash =========== */
diff --git a/tests/format/jsx/comments/jsfmt.spec.js b/tests/format/jsx/comments/jsfmt.spec.js
index 07f3661ca..9da7f2c2c 100644
--- a/tests/format/jsx/comments/jsfmt.spec.js
+++ b/tests/format/jsx/comments/jsfmt.spec.js
@@ -2,5 +2,6 @@ run_spec(import.meta, ["flow", "babel", "typescript"], {
bracketSameLine: true,
errors: {
typescript: ["in-end-tag.js"],
+ meriyah: ["in-end-tag.js", "fragment.js"],
},
});
diff --git a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap
index 4e00195c9..2b9b10722 100644
--- a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`do.js [acorn] format 1`] = `
+"Unexpected token (2:4)
+ 1 |
+> 2 | {do {
+ | ^
+ 3 | 1
+ 4 | }}
+ 5 |
"
+`;
+
+exports[`do.js [espree] format 1`] = `
+"Unexpected token do (2:4)
+ 1 |
+> 2 | {do {
+ | ^
+ 3 | 1
+ 4 | }}
+ 5 |
"
+`;
+
+exports[`do.js [meriyah] format 1`] = `
+"Unexpected token: 'do' (2:5)
+ 1 |
+> 2 | {do {
+ | ^
+ 3 | 1
+ 4 | }}
+ 5 |
"
+`;
+
exports[`do.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
diff --git a/tests/format/jsx/do/jsfmt.spec.js b/tests/format/jsx/do/jsfmt.spec.js
index bc92d92ef..e9d948b07 100644
--- a/tests/format/jsx/do/jsfmt.spec.js
+++ b/tests/format/jsx/do/jsfmt.spec.js
@@ -1 +1,7 @@
-run_spec(import.meta, ["babel"]);
+run_spec(import.meta, ["babel"], {
+ errors: {
+ acorn: ["do.js"],
+ espree: ["do.js"],
+ meriyah: ["do.js"],
+ },
+});
diff --git a/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap
index 91f2a0cf2..46b8cc019 100644
--- a/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`fragment.js [meriyah] format 1`] = `
+"Unexpected token: '>' (38:21)
+ 36 | );
+ 37 |
+> 38 | * open fragment */>
+ | ^
+ 39 |
+ 40 |
+ 41 | /* close fragment */>;"
+`;
+
exports[`fragment.js format 1`] = `
====================================options=====================================
parsers: ["flow", "babel", "typescript"]
diff --git a/tests/format/jsx/fragment/jsfmt.spec.js b/tests/format/jsx/fragment/jsfmt.spec.js
index 3bfcf87d2..ace271093 100644
--- a/tests/format/jsx/fragment/jsfmt.spec.js
+++ b/tests/format/jsx/fragment/jsfmt.spec.js
@@ -1 +1,3 @@
-run_spec(import.meta, ["flow", "babel", "typescript"]);
+run_spec(import.meta, ["flow", "babel", "typescript"], {
+ errors: { meriyah: ["fragment.js"] },
+});
diff --git a/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap
index 9b0372fde..de4256b62 100644
--- a/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/jsx/jsx/__snapshots__/jsfmt.spec.js.snap
@@ -2276,6 +2276,39 @@ foo ? (
================================================================================
`;
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} [acorn] format 1`] = `
+"Unexpected token (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} [espree] format 1`] = `
+"Unexpected token : (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} [meriyah] format 1`] = `
+"Expected ')' (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
====================================options=====================================
jsxSingleQuote: false
@@ -2564,6 +2597,39 @@ singleQuote: false
================================================================================
`;
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} [acorn] format 1`] = `
+"Unexpected token (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} [espree] format 1`] = `
+"Unexpected token : (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} [meriyah] format 1`] = `
+"Expected ')' (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
exports[`expression.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
====================================options=====================================
jsxSingleQuote: true
@@ -2852,6 +2918,39 @@ singleQuote: false
================================================================================
`;
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} [acorn] format 1`] = `
+"Unexpected token (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} [espree] format 1`] = `
+"Unexpected token : (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} [meriyah] format 1`] = `
+"Expected ')' (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
====================================options=====================================
jsxSingleQuote: false
@@ -3140,6 +3239,39 @@ singleQuote: true
================================================================================
`;
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} [acorn] format 1`] = `
+"Unexpected token (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} [espree] format 1`] = `
+"Unexpected token : (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
+exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} [meriyah] format 1`] = `
+"Expected ')' (87:8)
+ 85 | 87 | key: "possible_key_1" | "possible_key_2" | "possible_key_3",
+ | ^
+ 88 | value: string | Immutable.List,
+ 89 | ) => {
+ 90 | this.setState({"
+`;
+
exports[`expression.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
====================================options=====================================
jsxSingleQuote: true
diff --git a/tests/format/jsx/jsx/jsfmt.spec.js b/tests/format/jsx/jsx/jsfmt.spec.js
index 4169c9668..04e15f96a 100644
--- a/tests/format/jsx/jsx/jsfmt.spec.js
+++ b/tests/format/jsx/jsx/jsfmt.spec.js
@@ -1,16 +1,26 @@
+const errors = {
+ acorn: ["expression.js"],
+ espree: ["expression.js"],
+ meriyah: ["expression.js"],
+};
+
run_spec(import.meta, ["flow", "babel", "typescript"], {
singleQuote: false,
jsxSingleQuote: false,
+ errors,
});
run_spec(import.meta, ["flow", "babel", "typescript"], {
singleQuote: false,
jsxSingleQuote: true,
+ errors,
});
run_spec(import.meta, ["flow", "babel", "typescript"], {
singleQuote: true,
jsxSingleQuote: false,
+ errors,
});
run_spec(import.meta, ["flow", "babel", "typescript"], {
singleQuote: true,
jsxSingleQuote: true,
+ errors,
});
diff --git a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap
index 081bcf92c..b3a5b086b 100644
--- a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap
@@ -73,6 +73,24 @@ printWidth: 80
================================================================================
`;
+exports[`child.js [acorn] format 1`] = `
+"Unexpected token (1:7)
+> 1 | {...a}
;
+ | ^
+ 2 |
+ 3 | {...a /* comment */}
;
+ 4 |"
+`;
+
+exports[`child.js [espree] format 1`] = `
+"Unexpected token ... (1:7)
+> 1 | {...a}
;
+ | ^
+ 2 |
+ 3 | {...a /* comment */}
;
+ 4 |"
+`;
+
exports[`child.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/jsx/spread/jsfmt.spec.js b/tests/format/jsx/spread/jsfmt.spec.js
index 628d261a5..3e0182110 100644
--- a/tests/format/jsx/spread/jsfmt.spec.js
+++ b/tests/format/jsx/spread/jsfmt.spec.js
@@ -1 +1,6 @@
-run_spec(import.meta, ["babel", "flow", "typescript"]);
+run_spec(import.meta, ["babel", "flow", "typescript"], {
+ errors: {
+ acorn: ["child.js"],
+ espree: ["child.js"],
+ },
+});
diff --git a/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap
index 9c744fd99..1e0c8ab9a 100644
--- a/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,38 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`tuple.js [acorn] format 1`] = `
+"Unexpected character '[' (6:6)
+ 4 | ]
+ 5 |
+> 6 | a = #[
+ | ^
+ 7 | ,
+ 8 | ,
+ 9 | ]"
+`;
+
+exports[`tuple.js [espree] format 1`] = `
+"Unexpected character '[' (6:6)
+ 4 | ]
+ 5 |
+> 6 | a = #[
+ | ^
+ 7 | ,
+ 8 | ,
+ 9 | ]"
+`;
+
+exports[`tuple.js [meriyah] format 1`] = `
+"'#' not followed by identifier (6:5)
+ 4 | ]
+ 5 |
+> 6 | a = #[
+ | ^
+ 7 | ,
+ 8 | ,
+ 9 | ]"
+`;
+
exports[`tuple.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
diff --git a/tests/format/jsx/tuple/jsfmt.spec.js b/tests/format/jsx/tuple/jsfmt.spec.js
index bc92d92ef..2a08f076d 100644
--- a/tests/format/jsx/tuple/jsfmt.spec.js
+++ b/tests/format/jsx/tuple/jsfmt.spec.js
@@ -1 +1,7 @@
-run_spec(import.meta, ["babel"]);
+run_spec(import.meta, ["babel"], {
+ errors: {
+ acorn: ["tuple.js"],
+ espree: ["tuple.js"],
+ meriyah: ["tuple.js"],
+ },
+});