mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Integrated into release/v3.8.8. 9 legit test alignments + 34 new test files kept; restored 5 masked assertions (sk_ key redaction, circular/SSN redaction, T24 wait-log, THEORY-004 SSE, relay handoff) to strict/meaningful checks. Thanks @oyi77!
27 lines
763 B
TypeScript
27 lines
763 B
TypeScript
import { describe, it } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const mod = await import("../../open-sse/services/tokenLimitCounter.ts");
|
|
|
|
describe("tokenLimitCounter", () => {
|
|
describe("cache management", () => {
|
|
it("clearTokenLimitCache does not throw", () => {
|
|
mod.clearTokenLimitCache();
|
|
});
|
|
|
|
it("syncCache does not throw", () => {
|
|
mod.syncCache("test-limit-" + Date.now(), new Date().toISOString(), 100);
|
|
});
|
|
|
|
it("invalidateLimit does not throw", () => {
|
|
mod.invalidateLimit("test-limit-" + Date.now());
|
|
});
|
|
});
|
|
|
|
describe("recordTokenUsage", () => {
|
|
it("does not throw for empty limits", () => {
|
|
mod.recordTokenUsage([], { input: 10, output: 5, reasoning: 0 });
|
|
});
|
|
});
|
|
});
|