Archived
1
0

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:
Joe Previte
2022-02-15 16:19:22 -07:00
committed by GitHub
parent e3e9f052c4
commit 94f378c196
2 changed files with 19 additions and 9 deletions

View File

@ -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", () => {