Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { redactDiagnosticJsonString, redactDiagnosticText } from "./redaction";
|
||||
|
||||
describe("diagnostic redaction", () => {
|
||||
it("redacts sensitive scalar diagnostics", () => {
|
||||
expect(redactDiagnosticText("token=secret Authorization=Bearer abc123")).toBe("token=[REDACTED] Authorization=Bearer [REDACTED]");
|
||||
});
|
||||
|
||||
it("redacts sensitive JSON keys before UI display or copy", () => {
|
||||
expect(redactDiagnosticJsonString(JSON.stringify({ token: "secret", nested: { authorization: "Bearer abc123", kept: "value" } }))).toBe(
|
||||
'{\n "token": "[REDACTED]",\n "nested": {\n "authorization": "[REDACTED]",\n "kept": "value"\n }\n}',
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user