refactor(browser): return complete observation evidence

This commit is contained in:
morluto committed 2026-09-29 13:56:49 +08:00
1 parent 9d1f88cbe8
commit 0e2738ffb6
69 files changed
+747 -1206

No files matched your search

+1 -12
View File
@@ -1,9 +1,6 @@
import { describe, expect, it } from "vitest";
import {
boundedSensitiveText,
redactSensitiveText,
} from "./SensitiveTextCapture.js";
import { redactSensitiveText } from "./SensitiveTextCapture.js";
describe("sensitive console text", () => {
it("redacts assignments, bearer credentials, and JWT-shaped values", () => {
@@ -16,12 +13,4 @@ describe("sensitive console text", () => {
"authorization=[REDACTED] password=[REDACTED] api_key=[REDACTED] [REDACTED_JWT]",
);
});
it("bounds UTF-8 after redaction without splitting a code point", () => {
expect(boundedSensitiveText("password=secret 你好", 22)).toEqual({
text: "password=[REDACTED] ",
bytes: 20,
truncated: true,
});
});
});