Add a single test suite for blank files in all parsers (#4562)
* Add a single test suite for blank files in all parsers The parsers that don’t yet support blank files have been filtered out of the list until they do. * Don’t directly `require()` Prettier * Update `require` * Add missing Babylon parser * Update snapshotsmaster
parent
b0cb63a7bb
commit
a1e8d586ad
|
@ -1,11 +0,0 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty-file.css 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`single-space.css 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
|
@ -1 +0,0 @@
|
|||
run_spec(__dirname, ["css"]);
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty.js 1`] = `
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
`;
|
||||
|
||||
exports[`empty-file.js 1`] = `
|
||||
exports[`empty 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`single-space.js 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`newline 1`] = `
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`space 1`] = `
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`space-newline 1`] = `
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
|
|
@ -1 +1,15 @@
|
|||
run_spec(__dirname, ["flow", "typescript"]);
|
||||
const prettier = require("prettier/local");
|
||||
const parsers = prettier
|
||||
.getSupportInfo()
|
||||
.options.find(option => option.name === "parser");
|
||||
|
||||
run_spec(
|
||||
__dirname,
|
||||
parsers.choices
|
||||
.filter(choice => !choice.deprecated)
|
||||
.map(choice => choice.value)
|
||||
.filter(
|
||||
parser =>
|
||||
["json", "json5", "json-stringify", "graphql"].indexOf(parser) === -1
|
||||
)
|
||||
);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`semicolon.js 1`] = `
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, ["babylon", "flow", "typescript"]);
|
|
@ -1,15 +1,5 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty.md 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`empty.md 2`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
`;
|
||||
|
||||
exports[`real-world-case.md 1`] = `
|
||||
# Prettier
|
||||
|
||||
|
|
Loading…
Reference in New Issue