mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 13:55:50 +00:00
Merge remote-tracking branch 'guunergooner/fix/openai-stop-reason-usage'
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { describe, expect, test, beforeAll, afterAll } from "bun:test";
|
||||
import { formatBriefTimestamp } from "../formatBriefTimestamp";
|
||||
|
||||
let savedLcAll: string | undefined;
|
||||
beforeAll(() => {
|
||||
savedLcAll = process.env.LC_ALL;
|
||||
process.env.LC_ALL = "en_US.UTF-8";
|
||||
});
|
||||
afterAll(() => {
|
||||
if (savedLcAll === undefined) delete process.env.LC_ALL;
|
||||
else process.env.LC_ALL = savedLcAll;
|
||||
});
|
||||
|
||||
describe("formatBriefTimestamp", () => {
|
||||
// Fixed "now" for deterministic tests: 2026-04-02T14:00:00Z (Thursday)
|
||||
const now = new Date("2026-04-02T14:00:00Z");
|
||||
|
||||
@@ -76,6 +76,7 @@ function getLocale(): string | undefined {
|
||||
}
|
||||
}
|
||||
|
||||
/** Return the epoch-ms of the start of the local calendar day for `d`. */
|
||||
function startOfDay(d: Date): number {
|
||||
return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user