feat(testing): add test for parse
when error in args + config (#4866)
* chore: fmt cleanup * feat(parse): add test error w/config
This commit is contained in:
@ -361,6 +361,16 @@ describe("parser", () => {
|
||||
"$argon2i$v=19$m=4096,t=3,p=1$0qr/o+0t00hsbjfqcksfdq$ofcm4rl6o+b7oxpua4qlxubypbbpsf+8l531u7p9hyy",
|
||||
})
|
||||
})
|
||||
it("should throw an error for invalid config values", async () => {
|
||||
const fakePath = "/fake-config-path"
|
||||
const expectedErrMsg = `error reading ${fakePath}: `
|
||||
|
||||
expect(() =>
|
||||
parse(["--foo"], {
|
||||
configFile: fakePath,
|
||||
}),
|
||||
).toThrowError(expectedErrMsg)
|
||||
})
|
||||
})
|
||||
|
||||
describe("cli", () => {
|
||||
|
Reference in New Issue
Block a user