-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwrite.js
More file actions
27 lines (23 loc) · 646 Bytes
/
write.js
File metadata and controls
27 lines (23 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { runCli } from "../utils";
describe("write file with --write + unformatted file", () => {
runCli("write", ["--write", "unformatted.js"]).test({
status: 0,
});
});
describe("write file with -w + unformatted file", () => {
runCli("write", ["-w", "unformatted.js"]).test({
status: 0,
});
});
describe("do not write file with --write + formatted file", () => {
runCli("write", ["--write", "formatted.js"]).test({
write: [],
status: 0,
});
});
describe("do not write file with --write + invalid file", () => {
runCli("write", ["--write", "invalid.js"]).test({
write: [],
status: "non-zero",
});
});