test: add test for `--flow-parser`
parent
0630d174ab
commit
b13a104a7b
|
@ -7,6 +7,16 @@ exports[`boolean flags do not swallow the next argument 1`] = `
|
|||
|
||||
exports[`boolean flags do not swallow the next argument 2`] = `""`;
|
||||
|
||||
exports[`deprecated options are warned 1`] = `
|
||||
"console.log(\\"could be single quote and without semi\\");
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`deprecated options are warned 2`] = `
|
||||
"\`--flow-parser\` is deprecated. Use \`--parser flow\` instead.
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`negated options work 1`] = `
|
||||
"console.log(\\"could be single quote and without semi\\")
|
||||
"
|
||||
|
|
|
@ -33,3 +33,11 @@ test("unknown negated options are warned", () => {
|
|||
expect(result.stderr).toMatchSnapshot();
|
||||
expect(result.status).toEqual(0);
|
||||
});
|
||||
|
||||
test("deprecated options are warned", () => {
|
||||
const result = runPrettier("cli/arg-parsing", ["file.js", "--flow-parser"]);
|
||||
|
||||
expect(result.stdout).toMatchSnapshot();
|
||||
expect(result.stderr).toMatchSnapshot();
|
||||
expect(result.status).toEqual(0);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue