mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 14:26:07 +00:00
refactor(browser): return complete observation evidence
This commit is contained in:
1 parent
9d1f88cbe8
commit
0e2738ffb6
69 files changed
+747
-1206
No files matched your search
@@ -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,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user