Skip to content

Commit 84b2d75

Browse files
committed
Add tests for verbose option
1 parent 7a1d8da commit 84b2d75

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/jest/options.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ describe("options", () => {
1818
});
1919
});
2020

21+
describe("verbose option", () => {
22+
it("should error if no number is given", async () => {
23+
await expect(ctx.runEask("info -v")).rejects.toMatchObject({ code: 1 });
24+
});
25+
26+
it("should error if the number is omitted before the next option", async () => {
27+
await expect(ctx.runEask("info -v --no-color")).rejects.toMatchObject({
28+
code: 1,
29+
});
30+
});
31+
});
32+
2133
test.each([
2234
"-a",
2335
"--all",

0 commit comments

Comments
 (0)