Skip to content

Commit 271bc06

Browse files
authored
Merge pull request #4309 from cdr/jsjoeio-test-monday
feat(cli): add tests for password, hashed-password
2 parents dfc505b + 45319ec commit 271bc06

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/unit/node/cli.test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,18 @@ describe("parser", () => {
333333
})
334334
})
335335

336+
it("should error if password passed in", () => {
337+
expect(() => parse(["--password", "supersecret123"])).toThrowError(
338+
"--password can only be set in the config file or passed in via $PASSWORD",
339+
)
340+
})
341+
342+
it("should error if hashed-password passed in", () => {
343+
expect(() => parse(["--hashed-password", "fdas423fs8a"])).toThrowError(
344+
"--hashed-password can only be set in the config file or passed in via $HASHED_PASSWORD",
345+
)
346+
})
347+
336348
it("should filter proxy domains", async () => {
337349
const args = parse(["--proxy-domain", "*.coder.com", "--proxy-domain", "coder.com", "--proxy-domain", "coder.org"])
338350
expect(args).toEqual({

0 commit comments

Comments
 (0)