2017-10-06 11:01:21 +02:00
|
|
|
describe("write file with --write + unformatted file", () => {
|
2023-04-11 08:44:23 +08:00
|
|
|
runCli("cli/write", ["--write", "unformatted.js"]).test({
|
2017-10-02 11:08:34 -05:00
|
|
|
status: 0,
|
|
|
|
|
});
|
2017-09-03 21:31:33 +08:00
|
|
|
});
|
|
|
|
|
|
2020-07-27 10:10:01 +08:00
|
|
|
describe("write file with -w + unformatted file", () => {
|
2023-04-11 08:44:23 +08:00
|
|
|
runCli("cli/write", ["-w", "unformatted.js"]).test({
|
2020-07-27 10:10:01 +08:00
|
|
|
status: 0,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2017-10-06 11:01:21 +02:00
|
|
|
describe("do not write file with --write + formatted file", () => {
|
2023-04-11 08:44:23 +08:00
|
|
|
runCli("cli/write", ["--write", "formatted.js"]).test({
|
2017-10-02 11:08:34 -05:00
|
|
|
write: [],
|
|
|
|
|
status: 0,
|
|
|
|
|
});
|
2017-09-03 21:31:33 +08:00
|
|
|
});
|
|
|
|
|
|
2017-10-02 11:08:34 -05:00
|
|
|
describe("do not write file with --write + invalid file", () => {
|
2023-04-11 08:44:23 +08:00
|
|
|
runCli("cli/write", ["--write", "invalid.js"]).test({
|
2017-10-02 11:08:34 -05:00
|
|
|
write: [],
|
|
|
|
|
status: "non-zero",
|
|
|
|
|
});
|
2017-09-03 21:31:33 +08:00
|
|
|
});
|