Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
26 lines
747 B
TypeScript
26 lines
747 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveLogEnv } from "./env.js";
|
|
|
|
describe("resolveLogEnv", () => {
|
|
it("defaults to info and pretty outside production", () => {
|
|
expect(resolveLogEnv({})).toEqual({ level: "info", format: "pretty" });
|
|
expect(resolveLogEnv({ NODE_ENV: "production" })).toEqual({
|
|
level: "info",
|
|
format: "json",
|
|
});
|
|
});
|
|
|
|
it("honors explicit level and format", () => {
|
|
expect(resolveLogEnv({ LOG_LEVEL: "DEBUG", LOG_FORMAT: "json" })).toEqual({
|
|
level: "debug",
|
|
format: "json",
|
|
});
|
|
expect(
|
|
resolveLogEnv({ LOG_LEVEL: "nope", LOG_FORMAT: "pretty", NODE_ENV: "production" }),
|
|
).toEqual({
|
|
level: "info",
|
|
format: "pretty",
|
|
});
|
|
});
|
|
});
|