Skip to content

Commit 32bd249

Browse files
committed
feat: add more tests
1 parent 757bfca commit 32bd249

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/unit/node/cli.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,30 @@ describe("parser", () => {
382382
})
383383
})
384384

385+
it("should use env var CS_DISABLE_GETTING_STARTED_OVERRIDE", async () => {
386+
process.env.CS_DISABLE_GETTING_STARTED_OVERRIDE = "1"
387+
const args = parse([])
388+
expect(args).toEqual({})
389+
390+
const defaultArgs = await setDefaults(args)
391+
expect(defaultArgs).toEqual({
392+
...defaults,
393+
"disable-getting-started-override": true,
394+
})
395+
})
396+
397+
it("should use env var CS_DISABLE_GETTING_STARTED_OVERRIDE set to true", async () => {
398+
process.env.CS_DISABLE_GETTING_STARTED_OVERRIDE = "true"
399+
const args = parse([])
400+
expect(args).toEqual({})
401+
402+
const defaultArgs = await setDefaults(args)
403+
expect(defaultArgs).toEqual({
404+
...defaults,
405+
"disable-getting-started-override": true,
406+
})
407+
})
408+
385409
it("should error if password passed in", () => {
386410
expect(() => parse(["--password", "supersecret123"])).toThrowError(
387411
"--password can only be set in the config file or passed in via $PASSWORD",

0 commit comments

Comments
 (0)