From f3f75260ab5ef6715b5f63648b1c86eca53be3cc Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Mon, 28 Jun 2021 11:22:58 -0400 Subject: [PATCH] prettierx test: move prettierX-specific test variations into tests/format/x subdirectory tree based on some updates proposed in: - https://github.com/brodybits/prettierx/pull/603 update test comments rename dirpath -> dirPath to avoid spellcheck issues with updates from upstream Prettier Co-authored-by: Adaline Valentina Simonian Co-authored-by: Christopher J. Brody --- .../computed_props/with-inner-spacing/jsfmt.spec.js | 9 --------- .../with-inner-spacing/jsfmt.spec.js | 9 --------- .../empty_statement/with-inner-spacing/jsfmt.spec.js | 9 --------- .../with-inner-spacing/jsfmt.spec.js | 4 ++-- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../with-inner-spacing/jsfmt.spec.js | 4 ++-- .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/js/arrows-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../js/break-calls-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../computed-props-with-inner-spacing/jsfmt.spec.js | 9 +++++++++ .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 9 +++++++++ .../__snapshots__/jsfmt.spec.js.snap | 0 .../empty-statement-with-inner-spacing/jsfmt.spec.js | 9 +++++++++ .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/js/if-with-break-before-else}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../method-chain-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../with-inner-spacing/jsfmt.spec.js | 4 ++-- .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/js/template-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 12 ++++++------ .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/js/ternaries-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../with-balanced-formatting/jsfmt.spec.js | 10 +++++----- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/jsx/jsx-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../x/scss/scss-with-inner-spacing}/jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 9 +++++++++ .../__snapshots__/jsfmt.spec.js.snap | 0 .../jsfmt.spec.js | 6 +++--- .../__snapshots__/jsfmt.spec.js.snap | 0 .../function-type-with-inner-spacing/jsfmt.spec.js | 10 ++++++++++ .../with-inner-spacing/jsfmt.spec.js | 6 +++--- .../ts-standard/with-inner-spacing/jsfmt.spec.js | 4 ++-- .../mappedType/no-type-curly-spacing/jsfmt.spec.js | 9 --------- .../with-inner-spacing/jsfmt.spec.js | 10 ---------- 53 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 tests/computed_props/with-inner-spacing/jsfmt.spec.js delete mode 100644 tests/empty_paren_comment/with-inner-spacing/jsfmt.spec.js delete mode 100644 tests/empty_statement/with-inner-spacing/jsfmt.spec.js rename tests/{flow_function_parentheses/with-inner-spacing => format/x/flow/function-parentheses-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{flow_function_parentheses/with-inner-spacing => format/x/flow/function-parentheses-with-inner-spacing}/jsfmt.spec.js (61%) rename tests/{arrows/with-inner-spacing => format/x/js/arrows-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{arrows/with-inner-spacing => format/x/js/arrows-with-inner-spacing}/jsfmt.spec.js (66%) rename tests/{binary-expressions/with-inner-spacing => format/x/js/binary-expressions-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{binary-expressions/with-inner-spacing => format/x/js/binary-expressions-with-inner-spacing}/jsfmt.spec.js (56%) rename tests/{break-calls/with-inner-spacing => format/x/js/break-calls-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{break-calls/with-inner-spacing => format/x/js/break-calls-with-inner-spacing}/jsfmt.spec.js (62%) rename tests/{comments_closure_typecast/with-inner-spacing => format/x/js/comments-closure-typecast-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{comments_closure_typecast/with-inner-spacing => format/x/js/comments-closure-typecast-with-inner-spacing}/jsfmt.spec.js (65%) rename tests/{computed_props/with-inner-spacing => format/x/js/computed-props-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) create mode 100644 tests/format/x/js/computed-props-with-inner-spacing/jsfmt.spec.js rename tests/{empty_statement/with-inner-spacing => format/x/js/empty-paren-comment-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) create mode 100644 tests/format/x/js/empty-paren-comment-with-inner-spacing/jsfmt.spec.js rename tests/{empty_paren_comment/with-inner-spacing => format/x/js/empty-statement-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) create mode 100644 tests/format/x/js/empty-statement-with-inner-spacing/jsfmt.spec.js rename tests/{if/break-before-else => format/x/js/if-with-break-before-else}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{if/break-before-else => format/x/js/if-with-break-before-else}/jsfmt.spec.js (56%) rename tests/{method-chain/with-inner-spacing => format/x/js/method-chain-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{method-chain/with-inner-spacing => format/x/js/method-chain-with-inner-spacing}/jsfmt.spec.js (67%) rename tests/{template/with-inner-spacing => format/x/js/template-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{template/with-inner-spacing => format/x/js/template-with-inner-spacing}/jsfmt.spec.js (64%) rename tests/{ternaries/with-balanced-formatting => format/x/js/ternaries-with-balanced-formatting}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{ternaries/with-balanced-formatting => format/x/js/ternaries-with-balanced-formatting}/jsfmt.spec.js (78%) rename tests/{ternaries/with-inner-spacing => format/x/js/ternaries-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{ternaries/with-inner-spacing => format/x/js/ternaries-with-inner-spacing}/jsfmt.spec.js (66%) rename tests/{test_declarations/with-inner-spacing => format/x/js/test-declarations-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{test_declarations/with-inner-spacing => format/x/js/test-declarations-with-inner-spacing}/jsfmt.spec.js (64%) rename tests/{jsx/with-inner-spacing => format/x/jsx/jsx-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{jsx/with-inner-spacing => format/x/jsx/jsx-with-inner-spacing}/jsfmt.spec.js (70%) rename tests/{css_scss/with-inner-spacing => format/x/scss/scss-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{css_scss/with-inner-spacing => format/x/scss/scss-with-inner-spacing}/jsfmt.spec.js (52%) rename tests/{typescript_conditional_types/with-balanced-formatting => format/x/typescript/conditional-types-with-balanced-formatting}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{typescript_conditional_types/with-balanced-formatting => format/x/typescript/conditional-types-with-balanced-formatting}/jsfmt.spec.js (56%) rename tests/{typescript/conformance/types/indexedAccesType/with-inner-spacing => format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{typescript/conformance/types/indexedAccesType/with-inner-spacing => format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing}/jsfmt.spec.js (53%) rename tests/{typescript/conformance/types/mappedType/no-type-curly-spacing => format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) create mode 100644 tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/jsfmt.spec.js rename tests/{typescript/custom/modifiers/with-inner-spacing => format/x/typescript/custom-modifiers-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) rename tests/{typescript/custom/modifiers/with-inner-spacing => format/x/typescript/custom-modifiers-with-inner-spacing}/jsfmt.spec.js (53%) rename tests/{typescript_function_type/with-inner-spacing => format/x/typescript/function-type-with-inner-spacing}/__snapshots__/jsfmt.spec.js.snap (100%) create mode 100644 tests/format/x/typescript/function-type-with-inner-spacing/jsfmt.spec.js delete mode 100644 tests/typescript/conformance/types/mappedType/no-type-curly-spacing/jsfmt.spec.js delete mode 100644 tests/typescript_function_type/with-inner-spacing/jsfmt.spec.js diff --git a/tests/computed_props/with-inner-spacing/jsfmt.spec.js b/tests/computed_props/with-inner-spacing/jsfmt.spec.js deleted file mode 100644 index bbc3d968b4..0000000000 --- a/tests/computed_props/with-inner-spacing/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -// [prettierx] test script notice: -// This test script runs for test files in parent directory, -// **not** on any files in *this* directory. - -const dirpath = `${__dirname}/..`; - -run_spec(dirpath, ["babel", "babel-flow"], { - computedPropertySpacing: true, -}); diff --git a/tests/empty_paren_comment/with-inner-spacing/jsfmt.spec.js b/tests/empty_paren_comment/with-inner-spacing/jsfmt.spec.js deleted file mode 100644 index 6df2eef590..0000000000 --- a/tests/empty_paren_comment/with-inner-spacing/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -// [prettierx] test script notice: -// This test script runs for test files in parent directory, -// **not** on any files in *this* directory. - -const dirpath = `${__dirname}/..`; - -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { - spaceInParens: true, -}); diff --git a/tests/empty_statement/with-inner-spacing/jsfmt.spec.js b/tests/empty_statement/with-inner-spacing/jsfmt.spec.js deleted file mode 100644 index 6df2eef590..0000000000 --- a/tests/empty_statement/with-inner-spacing/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -// [prettierx] test script notice: -// This test script runs for test files in parent directory, -// **not** on any files in *this* directory. - -const dirpath = `${__dirname}/..`; - -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { - spaceInParens: true, -}); diff --git a/tests/format/x/angular/interpolation-additional-pipe-expressions/with-inner-spacing/jsfmt.spec.js b/tests/format/x/angular/interpolation-additional-pipe-expressions/with-inner-spacing/jsfmt.spec.js index a3b4c3c074..97e5e26941 100644 --- a/tests/format/x/angular/interpolation-additional-pipe-expressions/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/angular/interpolation-additional-pipe-expressions/with-inner-spacing/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["__ng_interpolation"], { +run_spec(dirPath, ["__ng_interpolation"], { // [prettierx] test with --paren-spacing spaceInParens: true, computedPropertySpacing: true, diff --git a/tests/flow_function_parentheses/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/flow/function-parentheses-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/flow_function_parentheses/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/flow/function-parentheses-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/flow_function_parentheses/with-inner-spacing/jsfmt.spec.js b/tests/format/x/flow/function-parentheses-with-inner-spacing/jsfmt.spec.js similarity index 61% rename from tests/flow_function_parentheses/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/flow/function-parentheses-with-inner-spacing/jsfmt.spec.js index a777249177..a51685cd04 100644 --- a/tests/flow_function_parentheses/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/flow/function-parentheses-with-inner-spacing/jsfmt.spec.js @@ -1,13 +1,13 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../flow_function_parentheses`; // [prettierx] test with --paren-spacing, only with defaults // including arrowParens: "avoid" // (note that this combination is **not** recommended) -run_spec(dirpath, ["flow", "babel", "babel-flow"], { +run_spec(dirPath, ["flow", "babel", "babel-flow"], { spaceInParens: true, typeAngleBracketSpacing: true, }); diff --git a/tests/format/x/js/align-object-properties/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/align-object-properties/with-inner-spacing/jsfmt.spec.js index c95173a41a..a7810daefd 100644 --- a/tests/format/x/js/align-object-properties/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/align-object-properties/with-inner-spacing/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // "Standard JS": alignObjectProperties: true, // prettierx: test with --paren-spacing diff --git a/tests/arrows/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/arrows-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/arrows/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/arrows-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/arrows/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/arrows-with-inner-spacing/jsfmt.spec.js similarity index 66% rename from tests/arrows/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/arrows-with-inner-spacing/jsfmt.spec.js index 510cf59832..f7a54f2e68 100644 --- a/tests/arrows/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/arrows-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../arrows`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] recommended option, especially in combo with --paren-spacing arrowParens: "avoid", // [prettierx] test with --paren-spacing diff --git a/tests/binary-expressions/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/binary-expressions-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/binary-expressions/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/binary-expressions-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/binary-expressions/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/binary-expressions-with-inner-spacing/jsfmt.spec.js similarity index 56% rename from tests/binary-expressions/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/binary-expressions-with-inner-spacing/jsfmt.spec.js index 6ec7c41cc3..31d226f9ea 100644 --- a/tests/binary-expressions/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/binary-expressions-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../binary-expressions`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] test with --paren-spacing spaceInParens: true, computedPropertySpacing: true, diff --git a/tests/break-calls/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/break-calls-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/break-calls/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/break-calls-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/break-calls/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/break-calls-with-inner-spacing/jsfmt.spec.js similarity index 62% rename from tests/break-calls/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/break-calls-with-inner-spacing/jsfmt.spec.js index aee917f6b2..59156ac08f 100644 --- a/tests/break-calls/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/break-calls-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../break-calls`; -run_spec(dirpath, ["babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel-flow", "flow", "typescript"], { // [prettierx] test with --paren-spacing spaceInParens: true, arrayBracketSpacing: true, diff --git a/tests/comments_closure_typecast/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/comments-closure-typecast-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/comments_closure_typecast/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/comments-closure-typecast-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/comments_closure_typecast/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/comments-closure-typecast-with-inner-spacing/jsfmt.spec.js similarity index 65% rename from tests/comments_closure_typecast/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/comments-closure-typecast-with-inner-spacing/jsfmt.spec.js index bdc3f48a82..a9cc1545dc 100644 --- a/tests/comments_closure_typecast/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/comments-closure-typecast-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../comments_closure_typecast`; -run_spec(dirpath, ["babel", "babel-flow"], { +run_spec(dirPath, ["babel", "babel-flow"], { // [prettierx] test with --paren-spacing spaceInParens: true, arrayBracketSpacing: true, diff --git a/tests/computed_props/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/computed-props-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/computed_props/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/computed-props-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/format/x/js/computed-props-with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/computed-props-with-inner-spacing/jsfmt.spec.js new file mode 100644 index 0000000000..a7c60438c2 --- /dev/null +++ b/tests/format/x/js/computed-props-with-inner-spacing/jsfmt.spec.js @@ -0,0 +1,9 @@ +// [prettierx] test script notice: +// This test script runs for test files in another directory, +// **not** on any files in *this* directory. + +const dirPath = `${__dirname}/../../../../computed_props`; + +run_spec(dirPath, ["babel", "babel-flow"], { + computedPropertySpacing: true, +}); diff --git a/tests/empty_statement/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/empty-paren-comment-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/empty_statement/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/empty-paren-comment-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/format/x/js/empty-paren-comment-with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/empty-paren-comment-with-inner-spacing/jsfmt.spec.js new file mode 100644 index 0000000000..6dfb7a23fa --- /dev/null +++ b/tests/format/x/js/empty-paren-comment-with-inner-spacing/jsfmt.spec.js @@ -0,0 +1,9 @@ +// [prettierx] test script notice: +// This test script runs for test files in another directory, +// **not** on any files in *this* directory. + +const dirPath = `${__dirname}/../../../../empty_statement`; + +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { + spaceInParens: true, +}); diff --git a/tests/empty_paren_comment/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/empty-statement-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/empty_paren_comment/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/empty-statement-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/format/x/js/empty-statement-with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/empty-statement-with-inner-spacing/jsfmt.spec.js new file mode 100644 index 0000000000..c184423222 --- /dev/null +++ b/tests/format/x/js/empty-statement-with-inner-spacing/jsfmt.spec.js @@ -0,0 +1,9 @@ +// [prettierx] test script notice: +// This test script runs for test files in another directory, +// **not** on any files in *this* directory. + +const dirPath = `${__dirname}/../../../../empty_paren_comment`; + +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { + spaceInParens: true, +}); diff --git a/tests/if/break-before-else/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/if-with-break-before-else/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/if/break-before-else/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/if-with-break-before-else/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/if/break-before-else/jsfmt.spec.js b/tests/format/x/js/if-with-break-before-else/jsfmt.spec.js similarity index 56% rename from tests/if/break-before-else/jsfmt.spec.js rename to tests/format/x/js/if-with-break-before-else/jsfmt.spec.js index 2229c4f326..5baff22a43 100644 --- a/tests/if/break-before-else/jsfmt.spec.js +++ b/tests/format/x/js/if-with-break-before-else/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../if`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] test with --break-before-else breakBeforeElse: true, // recommended: diff --git a/tests/method-chain/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/method-chain-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/method-chain/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/method-chain-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/method-chain/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/method-chain-with-inner-spacing/jsfmt.spec.js similarity index 67% rename from tests/method-chain/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/method-chain-with-inner-spacing/jsfmt.spec.js index e8543daf4f..2a19bf6177 100644 --- a/tests/method-chain/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/method-chain-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../method-chain`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] recommended setting with --paren-spacing arrowParens: "avoid", // [prettierx] test with --paren-spacing diff --git a/tests/format/x/js/no-indent-chains/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/no-indent-chains/with-inner-spacing/jsfmt.spec.js index e4a88d017e..a9d40bb31c 100644 --- a/tests/format/x/js/no-indent-chains/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/no-indent-chains/with-inner-spacing/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { indentChains: false, spaceInParens: true, spaceUnaryOps: true, diff --git a/tests/template/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/template-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/template/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/template-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/template/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/template-with-inner-spacing/jsfmt.spec.js similarity index 64% rename from tests/template/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/template-with-inner-spacing/jsfmt.spec.js index 3706816de2..ed608eed43 100644 --- a/tests/template/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/template-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../template`; -run_spec(dirpath, ["babel", "babel-flow"], { +run_spec(dirPath, ["babel", "babel-flow"], { // [prettierx] test with --paren-spacing spaceInParens: true, arrayBracketSpacing: true, diff --git a/tests/ternaries/with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/ternaries-with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/ternaries/with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/ternaries-with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/ternaries/with-balanced-formatting/jsfmt.spec.js b/tests/format/x/js/ternaries-with-balanced-formatting/jsfmt.spec.js similarity index 78% rename from tests/ternaries/with-balanced-formatting/jsfmt.spec.js rename to tests/format/x/js/ternaries-with-balanced-formatting/jsfmt.spec.js index e61f9beacd..13c2f1bf48 100644 --- a/tests/ternaries/with-balanced-formatting/jsfmt.spec.js +++ b/tests/format/x/js/ternaries-with-balanced-formatting/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../ternaries`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] balanced ternary formatting option // (with improved consistency with "Standard JS"): offsetTernaryExpressions: true, @@ -13,7 +13,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: tabWidth: 4, // [prettierx] balanced ternary formatting option @@ -24,7 +24,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: useTabs: true, // [prettierx] balanced ternary formatting option @@ -35,7 +35,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: useTabs: true, tabWidth: 4, diff --git a/tests/ternaries/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/ternaries-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/ternaries/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/ternaries-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/ternaries/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/ternaries-with-inner-spacing/jsfmt.spec.js similarity index 66% rename from tests/ternaries/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/ternaries-with-inner-spacing/jsfmt.spec.js index b08f5b1ef0..5bf11ae1c5 100644 --- a/tests/ternaries/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/ternaries-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../ternaries`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { spaceInParens: true, arrayBracketSpacing: true, computedPropertySpacing: true, diff --git a/tests/format/x/js/ternary-object-expressions/with-balanced-formatting/jsfmt.spec.js b/tests/format/x/js/ternary-object-expressions/with-balanced-formatting/jsfmt.spec.js index 9e3465e7c9..6a457a2e8b 100644 --- a/tests/format/x/js/ternary-object-expressions/with-balanced-formatting/jsfmt.spec.js +++ b/tests/format/x/js/ternary-object-expressions/with-balanced-formatting/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] balanced ternary formatting option, // for consistency with "Standard JS": offsetTernaryExpressions: true, @@ -13,7 +13,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: tabWidth: 4, // [prettierx] balanced ternary formatting option, @@ -24,7 +24,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: useTabs: true, // [prettierx] balanced ternary formatting option, @@ -35,7 +35,7 @@ run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // variation from ../jsfmt.spec.js: useTabs: true, tabWidth: 4, diff --git a/tests/test_declarations/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/js/test-declarations-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/test_declarations/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/js/test-declarations-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/test_declarations/with-inner-spacing/jsfmt.spec.js b/tests/format/x/js/test-declarations-with-inner-spacing/jsfmt.spec.js similarity index 64% rename from tests/test_declarations/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/js/test-declarations-with-inner-spacing/jsfmt.spec.js index b19c4e9871..59cd4b13c8 100644 --- a/tests/test_declarations/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/js/test-declarations-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../test_declarations`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { // [prettierx] recommended option, especially in combo with --paren-spacing arrowParens: "avoid", // [prettierx] test with --paren-spacing diff --git a/tests/jsx/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/jsx/jsx-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/jsx/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/jsx/jsx-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/jsx/with-inner-spacing/jsfmt.spec.js b/tests/format/x/jsx/jsx-with-inner-spacing/jsfmt.spec.js similarity index 70% rename from tests/jsx/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/jsx/jsx-with-inner-spacing/jsfmt.spec.js index 60784a5cab..c86d66a804 100644 --- a/tests/jsx/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/jsx/jsx-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../jsx`; -run_spec(dirpath, ["babel", "babel-flow", "flow", "typescript"], { +run_spec(dirPath, ["babel", "babel-flow", "flow", "typescript"], { singleQuote: false, jsxSingleQuote: false, // [prettierx] test with --paren-spacing diff --git a/tests/css_scss/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/scss/scss-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/css_scss/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/scss/scss-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/css_scss/with-inner-spacing/jsfmt.spec.js b/tests/format/x/scss/scss-with-inner-spacing/jsfmt.spec.js similarity index 52% rename from tests/css_scss/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/scss/scss-with-inner-spacing/jsfmt.spec.js index 4bc2ed43f2..85c73f9539 100644 --- a/tests/css_scss/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/scss/scss-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../css_scss`; -run_spec(dirpath, ["scss"], { +run_spec(dirPath, ["scss"], { // [prettierx] test with --css-paren-spacing cssParenSpacing: true, }); diff --git a/tests/typescript_conditional_types/with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/typescript/conditional-types-with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/typescript_conditional_types/with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/typescript/conditional-types-with-balanced-formatting/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/typescript_conditional_types/with-balanced-formatting/jsfmt.spec.js b/tests/format/x/typescript/conditional-types-with-balanced-formatting/jsfmt.spec.js similarity index 56% rename from tests/typescript_conditional_types/with-balanced-formatting/jsfmt.spec.js rename to tests/format/x/typescript/conditional-types-with-balanced-formatting/jsfmt.spec.js index 40c35746b3..56bece7912 100644 --- a/tests/typescript_conditional_types/with-balanced-formatting/jsfmt.spec.js +++ b/tests/format/x/typescript/conditional-types-with-balanced-formatting/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../typescript_conditional_types`; -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { // [prettierx] balanced ternary formatting option // (with improved consistency with "Standard JS"): offsetTernaryExpressions: true, diff --git a/tests/typescript/conformance/types/indexedAccesType/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/typescript/conformance/types/indexedAccesType/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/typescript/conformance/types/indexedAccesType/with-inner-spacing/jsfmt.spec.js b/tests/format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing/jsfmt.spec.js similarity index 53% rename from tests/typescript/conformance/types/indexedAccesType/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing/jsfmt.spec.js index d4c54e3e69..54e046b203 100644 --- a/tests/typescript/conformance/types/indexedAccesType/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/typescript/conformance-types-indexedAccesType-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../typescript/conformance/types/indexedAccesType`; -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { // [prettierx] test with --paren-spacing spaceInParens: true, typeAngleBracketSpacing: true, diff --git a/tests/typescript/conformance/types/mappedType/no-type-curly-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/typescript/conformance/types/mappedType/no-type-curly-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/jsfmt.spec.js b/tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/jsfmt.spec.js new file mode 100644 index 0000000000..5a800a5fc5 --- /dev/null +++ b/tests/format/x/typescript/conformance-types-mappedType-with-no-type-curly-spacing/jsfmt.spec.js @@ -0,0 +1,9 @@ +// [prettierx] test script notice: +// This test script runs for test files in another directory, +// **not** on any files in *this* directory. + +const dirPath = `${__dirname}/../../../../typescript/conformance/types/mappedType`; + +run_spec(dirPath, ["typescript"], { + typeCurlySpacing: false, +}); diff --git a/tests/typescript/custom/modifiers/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/typescript/custom-modifiers-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/typescript/custom/modifiers/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/typescript/custom-modifiers-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/typescript/custom/modifiers/with-inner-spacing/jsfmt.spec.js b/tests/format/x/typescript/custom-modifiers-with-inner-spacing/jsfmt.spec.js similarity index 53% rename from tests/typescript/custom/modifiers/with-inner-spacing/jsfmt.spec.js rename to tests/format/x/typescript/custom-modifiers-with-inner-spacing/jsfmt.spec.js index 16fe122133..8abb0afeb8 100644 --- a/tests/typescript/custom/modifiers/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/typescript/custom-modifiers-with-inner-spacing/jsfmt.spec.js @@ -1,10 +1,10 @@ // [prettierx] test script notice: -// This test script runs for test files in parent directory, +// This test script runs for test files in another directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/../../../../typescript/custom/modifiers`; -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { // [prettierx] test with spacing options (...) typeAngleBracketSpacing: true, typeBracketSpacing: true, diff --git a/tests/typescript_function_type/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/x/typescript/function-type-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap similarity index 100% rename from tests/typescript_function_type/with-inner-spacing/__snapshots__/jsfmt.spec.js.snap rename to tests/format/x/typescript/function-type-with-inner-spacing/__snapshots__/jsfmt.spec.js.snap diff --git a/tests/format/x/typescript/function-type-with-inner-spacing/jsfmt.spec.js b/tests/format/x/typescript/function-type-with-inner-spacing/jsfmt.spec.js new file mode 100644 index 0000000000..96befd4354 --- /dev/null +++ b/tests/format/x/typescript/function-type-with-inner-spacing/jsfmt.spec.js @@ -0,0 +1,10 @@ +// [prettierx] test script notice: +// This test script runs for test files in another directory, +// **not** on any files in *this* directory. + +const dirPath = `${__dirname}/../../../../typescript_function_type`; + +run_spec(dirPath, ["typescript"], { + // [prettierx] test with --paren-spacing + spaceInParens: true, +}); diff --git a/tests/format/x/typescript/space-before-function-paren-tslint/with-inner-spacing/jsfmt.spec.js b/tests/format/x/typescript/space-before-function-paren-tslint/with-inner-spacing/jsfmt.spec.js index c60e48976e..b94ded0130 100644 --- a/tests/format/x/typescript/space-before-function-paren-tslint/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/typescript/space-before-function-paren-tslint/with-inner-spacing/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { spaceInParens: true, typeAngleBracketSpacing: true, // "Standard JS": @@ -12,7 +12,7 @@ run_spec(dirpath, ["typescript"], { trailingComma: "none", }); -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { spaceInParens: true, typeAngleBracketSpacing: true, // "Standard JS": diff --git a/tests/format/x/typescript/ts-standard/with-inner-spacing/jsfmt.spec.js b/tests/format/x/typescript/ts-standard/with-inner-spacing/jsfmt.spec.js index b528eb6d53..e4f263a48f 100644 --- a/tests/format/x/typescript/ts-standard/with-inner-spacing/jsfmt.spec.js +++ b/tests/format/x/typescript/ts-standard/with-inner-spacing/jsfmt.spec.js @@ -2,9 +2,9 @@ // This test script runs for test files in parent directory, // **not** on any files in *this* directory. -const dirpath = `${__dirname}/..`; +const dirPath = `${__dirname}/..`; -run_spec(dirpath, ["typescript"], { +run_spec(dirPath, ["typescript"], { spaceInParens: true, yieldStarSpacing: true, generatorStarSpacing: true, diff --git a/tests/typescript/conformance/types/mappedType/no-type-curly-spacing/jsfmt.spec.js b/tests/typescript/conformance/types/mappedType/no-type-curly-spacing/jsfmt.spec.js deleted file mode 100644 index 1cdfe6f81d..0000000000 --- a/tests/typescript/conformance/types/mappedType/no-type-curly-spacing/jsfmt.spec.js +++ /dev/null @@ -1,9 +0,0 @@ -// [prettierx] test script notice: -// This test script runs for test files in parent directory, -// **not** on any files in *this* directory. - -const dirpath = `${__dirname}/..`; - -run_spec(dirpath, ["typescript"], { - typeCurlySpacing: false, -}); diff --git a/tests/typescript_function_type/with-inner-spacing/jsfmt.spec.js b/tests/typescript_function_type/with-inner-spacing/jsfmt.spec.js deleted file mode 100644 index b0b2353f61..0000000000 --- a/tests/typescript_function_type/with-inner-spacing/jsfmt.spec.js +++ /dev/null @@ -1,10 +0,0 @@ -// [prettierx] test script notice: -// This test script runs for test files in parent directory, -// **not** on any files in *this* directory. - -const dirpath = `${__dirname}/..`; - -run_spec(dirpath, ["typescript"], { - // [prettierx] test with --paren-spacing - spaceInParens: true, -});