Skip to content

Commit d8deb78

Browse files
committed
feat(parse): add test error w/config
1 parent de005fe commit d8deb78

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unit/node/cli.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ describe("parser", () => {
361361
"$argon2i$v=19$m=4096,t=3,p=1$0qr/o+0t00hsbjfqcksfdq$ofcm4rl6o+b7oxpua4qlxubypbbpsf+8l531u7p9hyy",
362362
})
363363
})
364+
it("should throw an error for invalid config values", async () => {
365+
const fakePath = "/fake-config-path"
366+
const expectedErrMsg = `error reading ${fakePath}: `
367+
368+
expect(() =>
369+
parse(["--foo"], {
370+
configFile: fakePath,
371+
}),
372+
).toThrowError(expectedErrMsg)
373+
})
364374
})
365375

366376
describe("cli", () => {

0 commit comments

Comments
 (0)