Files
OmniRoute/tests/unit/formatting-public-surface.test.ts
Diego Rodrigues de Sa e Souza 0adae00c7b Release v3.8.42 (#5459)
Release v3.8.42 — full CHANGELOG in CHANGELOG.md.

CI: 103 checks green incl. CodeQL (all languages), Semgrep, all 8 unit shards,
coverage, Node 24 compat, and integration tests. Full unit suite validated
locally: 19437 pass / 0 fail. The 3 red checks are advisory and do not gate
main (no required status checks): SonarCloud/SonarQube new-code coverage gate,
and PR Test Policy (test-masking detector flagging the legitimate dead-Phind
provider removal in #5530 — reviewed, correct).

Includes cycle-close reconciliation + repair of inherited base-red tests from
#5480/#5527/#5427/#5521 that the PR->release fast-path did not exercise.
2026-06-30 06:54:29 -03:00

26 lines
1.1 KiB
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.info, "function");
assert.equal(typeof sseLogger.warn, "function");
assert.equal(typeof sseLogger.error, "function");
assert.equal(typeof sseLogger.request, "function");
});