mirror of
https://github.com/danog/code-server.git
synced 2024-11-30 04:39:46 +01:00
testing: add new test for logLevels (#4953)
* feat: add new test for logLevels * wip * feat: add test for valid log level env var
This commit is contained in:
parent
3c6f85c282
commit
643ef1392f
@ -194,6 +194,15 @@ describe("parser", () => {
|
||||
expect(logger.level).toEqual(Level.Trace)
|
||||
})
|
||||
|
||||
it("should set valid log level env var", async () => {
|
||||
process.env.LOG_LEVEL = "error"
|
||||
const defaults = await setDefaults(parse([]))
|
||||
expect(defaults).toEqual({
|
||||
...defaults,
|
||||
log: "error",
|
||||
})
|
||||
})
|
||||
|
||||
it("should ignore invalid log level env var", async () => {
|
||||
process.env.LOG_LEVEL = "bogus"
|
||||
const defaults = await setDefaults(parse([]))
|
||||
|
Loading…
Reference in New Issue
Block a user