Files
test-repo/tests_integration/__tests__/debug-check.js
T
Ika 6c8cde9672 fix(cli): do not early exit for --debug-check (#2987)
* test: add failing test

* fix(cli): do not early exit for `--debug-check`
2017-10-07 04:36:43 -05:00

28 lines
641 B
JavaScript

"use strict";
const runPrettier = require("../runPrettier");
describe("doesn't crash when --debug-check is passed", () => {
runPrettier("cli/with-shebang", ["issue1890.js", "--debug-check"]).test({
stdout: "issue1890.js\n",
stderr: "",
status: 0
});
});
describe("checks stdin with --debug-check", () => {
runPrettier("cli/with-shebang", ["--debug-check"], {
input: "0"
}).test({
stdout: "(stdin)\n",
stderr: "",
status: 0
});
});
describe("show diff for 2+ error files with --debug-check", () => {
runPrettier("cli/debug-check", ["*.js", "--debug-check"]).test({
status: "non-zero"
});
});