diff --git a/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap b/tests_integration/__tests__/__snapshots__/arg-parsing.js.snap index 709660a5..4476f7f2 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 option values are warned 1`] = ` +"console.log(\\"could be single quote and without semi\\"); +" +`; + +exports[`deprecated option values are warned 2`] = ` +"Warning: \`--trailing-comma\` was used without an argument. This is deprecated. Specify \\"none\\", \\"es5\\", or \\"all\\". +" +`; + exports[`deprecated options are warned 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 69478d00..7465a2a0 100644 --- a/tests_integration/__tests__/arg-parsing.js +++ b/tests_integration/__tests__/arg-parsing.js @@ -41,3 +41,14 @@ test("deprecated options are warned", () => { expect(result.stderr).toMatchSnapshot(); expect(result.status).toEqual(0); }); + +test("deprecated option values are warned", () => { + const result = runPrettier("cli/arg-parsing", [ + "file.js", + "--trailing-comma" + ]); + + expect(result.stdout).toMatchSnapshot(); + expect(result.stderr).toMatchSnapshot(); + expect(result.status).toEqual(0); +});