mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
Verified dead-code removal: merged result passes typecheck:core + 194 affected unit tests + ESLint clean. Integrated into release/v3.8.41. Thanks @JxnLexn for the cleanup!
23 lines
1003 B
TypeScript
23 lines
1003 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const formatting = await import("../../src/shared/utils/formatting.ts");
|
|
const sseLogger = await import("../../src/sse/utils/logger.ts");
|
|
|
|
test("formatting utilities public surface excludes removed display helpers", () => {
|
|
assert.equal(Object.hasOwn(formatting, "formatDateTime"), false);
|
|
assert.equal(Object.hasOwn(formatting, "maskKey"), false);
|
|
assert.equal(Object.hasOwn(formatting, "formatCostAbbreviated"), false);
|
|
|
|
assert.equal(formatting.formatTime("2026-06-29T12:34:56Z").length, 8);
|
|
assert.equal(formatting.formatDuration(1250), "1.3s");
|
|
assert.equal(formatting.maskSegment("abcdef", 2, 2), "ab***ef");
|
|
assert.equal(formatting.formatCost(0.0123), "$0.0123");
|
|
});
|
|
|
|
test("sse logger wrapper no longer re-exports formatting maskKey", () => {
|
|
assert.equal(Object.hasOwn(sseLogger, "maskKey"), false);
|
|
assert.equal(typeof sseLogger.debug, "function");
|
|
assert.equal(typeof sseLogger.warn, "function");
|
|
});
|