diff --git a/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap b/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap index 88c70b7e..709660a5 100644 --- a/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap +++ b/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap @@ -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\\") " diff --git a/tests_integration/__tests__/arg-parsing.js b/tests_integration/__tests__/arg-parsing.js index 553a4ff2..69478d00 100644 --- a/tests_integration/__tests__/arg-parsing.js +++ b/tests_integration/__tests__/arg-parsing.js @@ -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); +});