expect(readConfiguredLogTail).toHaveBeenCalledTimes(1);
expect(stdoutWrites.join("")).toContain("local fallback line");
expect(stderrWrites.join("")).toContain("reading local log file instead");
});
describe("formatLogTimestamp", () => {
it("formats UTC timestamp in plain mode by default", () => { const result = formatLogTimestamp("2025-01-01T12:00:00.000Z");
expect(result).toBe("2025-01-01T12:00:00.000Z");
});
it("formats UTC timestamp in pretty mode", () => { const result = formatLogTimestamp("2025-01-01T12:00:00.000Z", "pretty");
expect(result).toBe("12:00:00+00:00");
});
it("formats local time in plain mode when localTime is true", () => { const utcTime = "2025-01-01T12:00:00.000Z"; const result = formatLogTimestamp(utcTime, "plain", true); // Should be local time with explicit timezone offset (not 'Z' suffix).
expect(result).toMatch(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}[+-]\d{2}:\d{2}$/); // The exact time depends on timezone, but should be different from UTC
expect(result).not.toBe(utcTime);
});
it("formats local time in pretty mode when localTime is true", () => { const utcTime = "2025-01-01T12:00:00.000Z"; const result = formatLogTimestamp(utcTime, "pretty", true); // Should be HH:MM:SS±HH:MM format with timezone offset.
expect(result).toMatch(/^\d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/);
});
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.