Files
test-repo/tests_integration/__tests__/debug-check.js
T
Ika 317f3a3c56 feat: split out JSON5 (#4367)
* feat: split out JSON5

* test: update snapshots

* test: update debug-check tests

* feat(playground): use JSON's code sample for JSON5

* fix: add missing trailing newline
2018-04-25 22:10:22 +08:00

33 lines
718 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", [
"*.debug-check",
"--debug-check",
"--plugin",
"./plugin-for-testing-debug-check"
]).test({
status: "non-zero"
});
});