- GitHub Desktop has encountered an unrecoverable error and will need to 1231231
- restart. This has been reported to the team, but if youencounter this121312331
- repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
-
-
-=====================================output=====================================
-
"'} />;
-
;
-
;
-
;
-
;
-
-
- GitHub Desktop has encountered an unrecoverable error and will need to 1231231
- restart. This has been reported to the team, but if youencounter this121312331
- repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
-
;
-
-================================================================================
-`;
-
-exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
printWidth: 80 (default) |
=====================================input======================================
x =
one
,
two
;
@@ -5337,74 +1225,9 @@ x =
{/w/.test(s)};
================================================================================
`;
-exports[`regex.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+exports[`return-statement.js format 1`] = `
====================================options=====================================
-jsxSingleQuote: true
parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-x =
one
,
two
;
-x =
{}
-x =
{1/2}
-x =
{/w/.test(s)}
-
-=====================================output=====================================
-((x =
one
), (
two
));
-x =
{};
-x =
{1 / 2};
-x =
{/w/.test(s)};
-
-================================================================================
-`;
-
-exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-x =
one
,
two
;
-x =
{}
-x =
{1/2}
-x =
{/w/.test(s)}
-
-=====================================output=====================================
-((x =
one
), (
two
));
-x =
{};
-x =
{1 / 2};
-x =
{/w/.test(s)};
-
-================================================================================
-`;
-
-exports[`regex.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-x =
one
,
two
;
-x =
{}
-x =
{1/2}
-x =
{/w/.test(s)}
-
-=====================================output=====================================
-((x =
one
), (
two
));
-x =
{};
-x =
{1 / 2};
-x =
{/w/.test(s)};
-
-================================================================================
-`;
-
-exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
printWidth: 80 (default) |
=====================================input======================================
const NonBreakingArrowExpression = () =>
;
@@ -5513,350 +1336,9 @@ class BreakingClass extends React.component {
================================================================================
`;
-exports[`return-statement.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+exports[`self-closing.js format 1`] = `
====================================options=====================================
-jsxSingleQuote: true
parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () =>
;
-
-const NonBreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const BreakingArrowExpressionWBody = () => {
- return
-};
-
-const NonBreakingFunction = function() {
- return (
-
- );
-};
-
-const BreakingFunction = function() {
- return
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-=====================================output=====================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () => (
-
-);
-
-const NonBreakingArrowExpressionWBody = () => {
- return
;
-};
-
-const BreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const NonBreakingFunction = function () {
- return
;
-};
-
-const BreakingFunction = function () {
- return (
-
- );
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-================================================================================
-`;
-
-exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () =>
;
-
-const NonBreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const BreakingArrowExpressionWBody = () => {
- return
-};
-
-const NonBreakingFunction = function() {
- return (
-
- );
-};
-
-const BreakingFunction = function() {
- return
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-=====================================output=====================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () => (
-
-);
-
-const NonBreakingArrowExpressionWBody = () => {
- return
;
-};
-
-const BreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const NonBreakingFunction = function () {
- return
;
-};
-
-const BreakingFunction = function () {
- return (
-
- );
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-================================================================================
-`;
-
-exports[`return-statement.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () =>
;
-
-const NonBreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const BreakingArrowExpressionWBody = () => {
- return
-};
-
-const NonBreakingFunction = function() {
- return (
-
- );
-};
-
-const BreakingFunction = function() {
- return
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-=====================================output=====================================
-const NonBreakingArrowExpression = () =>
;
-
-const BreakingArrowExpression = () => (
-
-);
-
-const NonBreakingArrowExpressionWBody = () => {
- return
;
-};
-
-const BreakingArrowExpressionWBody = () => {
- return (
-
- );
-};
-
-const NonBreakingFunction = function () {
- return
;
-};
-
-const BreakingFunction = function () {
- return (
-
- );
-};
-
-class NonBreakingClass extends React.component {
- render() {
- return
;
- }
-}
-
-class BreakingClass extends React.component {
- render() {
- return (
-
- );
- }
-}
-
-================================================================================
-`;
-
-exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
printWidth: 80 (default) |
=====================================input======================================
;
@@ -5869,62 +1351,9 @@ singleQuote: false
================================================================================
`;
-exports[`self-closing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+exports[`spacing.js format 1`] = `
====================================options=====================================
-jsxSingleQuote: true
parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-
;
-
;
-
-=====================================output=====================================
-
;
-
;
-
-================================================================================
-`;
-
-exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-
;
-
;
-
-=====================================output=====================================
-
;
-
;
-
-================================================================================
-`;
-
-exports[`self-closing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-
;
-
;
-
-=====================================output=====================================
-
;
-
;
-
-================================================================================
-`;
-
-exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
printWidth: 80 (default) |
=====================================input======================================
const Labels = {
@@ -5959,128 +1388,9 @@ const Labels = {
================================================================================
`;
-exports[`spacing.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+exports[`template-literal-in-attr.js format 1`] = `
====================================options=====================================
-jsxSingleQuote: true
parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-const Labels = {
- label1: (
-
- Label 1
-
- ),
-
- label2: (
-
- Label 2
-
- ),
-
- label3: (
-
- Label 3
-
- ),
-};
-
-=====================================output=====================================
-const Labels = {
- label1:
Label 1,
-
- label2:
Label 2,
-
- label3:
Label 3,
-};
-
-================================================================================
-`;
-
-exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-const Labels = {
- label1: (
-
- Label 1
-
- ),
-
- label2: (
-
- Label 2
-
- ),
-
- label3: (
-
- Label 3
-
- ),
-};
-
-=====================================output=====================================
-const Labels = {
- label1:
Label 1,
-
- label2:
Label 2,
-
- label3:
Label 3,
-};
-
-================================================================================
-`;
-
-exports[`spacing.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-const Labels = {
- label1: (
-
- Label 1
-
- ),
-
- label2: (
-
- Label 2
-
- ),
-
- label3: (
-
- Label 3
-
- ),
-};
-
-=====================================output=====================================
-const Labels = {
- label1:
Label 1,
-
- label2:
Label 2,
-
- label3:
Label 3,
-};
-
-================================================================================
-`;
-
-exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
printWidth: 80 (default) |
=====================================input======================================
@@ -6107,149 +1417,9 @@ singleQuote: false
================================================================================
`;
-exports[`template-literal-in-attr.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+exports[`ternary.js format 1`] = `
====================================options=====================================
-jsxSingleQuote: true
parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-
-
-=====================================output=====================================
-
;
-
-================================================================================
-`;
-
-exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-
-
-=====================================output=====================================
-
;
-
-================================================================================
-`;
-
-exports[`template-literal-in-attr.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-
-
-=====================================output=====================================
-
;
-
-================================================================================
-`;
-
-exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-=====================================output=====================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-================================================================================
-`;
-
-exports[`ternary.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: false
- printWidth: 80 (default) |
-=====================================input======================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-=====================================output=====================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-================================================================================
-`;
-
-exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: false
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
- printWidth: 80 (default) |
-=====================================input======================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-=====================================output=====================================
-a == 3 ? (a =
123
) : (a =
abc
);
-
-================================================================================
-`;
-
-exports[`ternary.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
-====================================options=====================================
-jsxSingleQuote: true
-parsers: ["babel", "typescript", "flow"]
-singleQuote: true
printWidth: 80 (default) |
=====================================input======================================
a == 3 ? (a =
123
) : (a =
abc
);
diff --git a/tests/format/jsx/jsx/flow_fix_me.js b/tests/format/jsx/jsx/flow-fix-me.js
similarity index 100%
rename from tests/format/jsx/jsx/flow_fix_me.js
rename to tests/format/jsx/jsx/flow-fix-me.js
diff --git a/tests/format/jsx/jsx/format.test.js b/tests/format/jsx/jsx/format.test.js
index 441dcc225..8adc66f60 100644
--- a/tests/format/jsx/jsx/format.test.js
+++ b/tests/format/jsx/jsx/format.test.js
@@ -1,16 +1 @@
-runFormatTest(import.meta, ["babel", "typescript", "flow"], {
- singleQuote: false,
- jsxSingleQuote: false,
-});
-runFormatTest(import.meta, ["babel", "typescript", "flow"], {
- singleQuote: false,
- jsxSingleQuote: true,
-});
-runFormatTest(import.meta, ["babel", "typescript", "flow"], {
- singleQuote: true,
- jsxSingleQuote: false,
-});
-runFormatTest(import.meta, ["babel", "typescript", "flow"], {
- singleQuote: true,
- jsxSingleQuote: true,
-});
+runFormatTest(import.meta, ["babel", "typescript", "flow"]);
diff --git a/tests/format/jsx/jsx/html_escape.js b/tests/format/jsx/jsx/html-escape.js
similarity index 100%
rename from tests/format/jsx/jsx/html_escape.js
rename to tests/format/jsx/jsx/html-escape.js
diff --git a/tests/format/jsx/quotes/__snapshots__/format.test.js.snap b/tests/format/jsx/quotes/__snapshots__/format.test.js.snap
new file mode 100644
index 000000000..549fbfdb9
--- /dev/null
+++ b/tests/format/jsx/quotes/__snapshots__/format.test.js.snap
@@ -0,0 +1,389 @@
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
+
+exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":false} format 1`] = `
+====================================options=====================================
+jsxSingleQuote: false
+parsers: ["babel", "typescript", "flow"]
+singleQuote: false
+ printWidth: 80 (default) |
+=====================================input======================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
+
+=====================================output=====================================
+
;
+
;
+
""} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
+
;
+
+================================================================================
+`;
+
+exports[`quotes.js - {"singleQuote":false,"jsxSingleQuote":true} format 1`] = `
+====================================options=====================================
+jsxSingleQuote: true
+parsers: ["babel", "typescript", "flow"]
+singleQuote: false
+ printWidth: 80 (default) |
+=====================================input======================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
+
+=====================================output=====================================
+
;
+
;
+
""} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
+
;
+
+================================================================================
+`;
+
+exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":false} format 1`] = `
+====================================options=====================================
+jsxSingleQuote: false
+parsers: ["babel", "typescript", "flow"]
+singleQuote: true
+ printWidth: 80 (default) |
+=====================================input======================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
+
+=====================================output=====================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
;
+
+================================================================================
+`;
+
+exports[`quotes.js - {"singleQuote":true,"jsxSingleQuote":true} format 1`] = `
+====================================options=====================================
+jsxSingleQuote: true
+parsers: ["babel", "typescript", "flow"]
+singleQuote: true
+ printWidth: 80 (default) |
+=====================================input======================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
+
+=====================================output=====================================
+
;
+
;
+
"'} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{' '}{' '}
+
;
+
+================================================================================
+`;
diff --git a/tests/format/jsx/quotes/format.test.js b/tests/format/jsx/quotes/format.test.js
new file mode 100644
index 000000000..441dcc225
--- /dev/null
+++ b/tests/format/jsx/quotes/format.test.js
@@ -0,0 +1,16 @@
+runFormatTest(import.meta, ["babel", "typescript", "flow"], {
+ singleQuote: false,
+ jsxSingleQuote: false,
+});
+runFormatTest(import.meta, ["babel", "typescript", "flow"], {
+ singleQuote: false,
+ jsxSingleQuote: true,
+});
+runFormatTest(import.meta, ["babel", "typescript", "flow"], {
+ singleQuote: true,
+ jsxSingleQuote: false,
+});
+runFormatTest(import.meta, ["babel", "typescript", "flow"], {
+ singleQuote: true,
+ jsxSingleQuote: true,
+});
diff --git a/tests/format/jsx/jsx/quotes.js b/tests/format/jsx/quotes/quotes.js
similarity index 100%
rename from tests/format/jsx/jsx/quotes.js
rename to tests/format/jsx/quotes/quotes.js