Skip to content

Commit

Permalink
prettierx test import & export with multiple Babel parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
brodybits committed Jun 14, 2021
1 parent fbbbf98 commit c0f73fe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
8 changes: 4 additions & 4 deletions tests/export/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -2,7 +2,7 @@

exports[`bracket.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -37,7 +37,7 @@ export { fitsIn, oneLine };
exports[`bracket.js 2`] = `
====================================options=====================================
exportCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -71,7 +71,7 @@ export {fitsIn, oneLine};

exports[`empty.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -88,7 +88,7 @@ export {} from ".";
exports[`empty.js 2`] = `
====================================options=====================================
exportCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
7 changes: 5 additions & 2 deletions tests/export/jsfmt.spec.js
@@ -1,2 +1,5 @@
run_spec(__dirname, ["flow", "typescript"]);
run_spec(__dirname, ["flow", "typescript"], { exportCurlySpacing: false });
// [prettierx] test with muliple Babel parsers:
run_spec(__dirname, ["babel", "babel-flow", "flow", "typescript"]);
run_spec(__dirname, ["babel", "babel-flow", "flow", "typescript"], {
exportCurlySpacing: false,
});
24 changes: 12 additions & 12 deletions tests/import/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -2,7 +2,7 @@

exports[`brackets.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -37,7 +37,7 @@ import { fitsIn, oneLine } from ".";
exports[`brackets.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -71,7 +71,7 @@ import {fitsIn, oneLine} from ".";

exports[`comments.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -176,7 +176,7 @@ import x, {
exports[`comments.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -280,7 +280,7 @@ import x, {

exports[`empty-import.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -295,7 +295,7 @@ import {} from "@types/googlemaps";
exports[`empty-import.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -309,7 +309,7 @@ import {} from "@types/googlemaps";

exports[`inline.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -335,7 +335,7 @@ import {
exports[`inline.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -360,7 +360,7 @@ import {

exports[`long-line.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -375,7 +375,7 @@ import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithA
exports[`long-line.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -389,7 +389,7 @@ import someCoolUtilWithARatherLongName from "../../../../utils/someCoolUtilWithA

exports[`multiple_standalones.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -404,7 +404,7 @@ import a, * as b from "a";
exports[`multiple_standalones.js 2`] = `
====================================options=====================================
importCurlySpacing: false
parsers: ["flow", "typescript"]
parsers: ["babel", "babel-flow", "flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
7 changes: 5 additions & 2 deletions tests/import/jsfmt.spec.js
@@ -1,2 +1,5 @@
run_spec(__dirname, ["flow", "typescript"]);
run_spec(__dirname, ["flow", "typescript"], { importCurlySpacing: false });
// [prettierx] test with muliple Babel parsers:
run_spec(__dirname, ["babel", "babel-flow", "flow", "typescript"]);
run_spec(__dirname, ["babel", "babel-flow", "flow", "typescript"], {
importCurlySpacing: false,
});

0 comments on commit c0f73fe

Please sign in to comment.