mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 02:20:38 +00:00
* Tests: stabilize detect-secrets fixtures * Tests: fix rebased detect-secrets false positives * Docs: keep snippets valid under detect-secrets * Tests: finalize detect-secrets false-positive fixes * Tests: reduce detect-secrets false positives * Tests: keep detect-secrets pragmas inline * Tests: remediate next detect-secrets batch * Tests: tighten detect-secrets allowlists * Tests: stabilize detect-secrets formatter drift
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { projectSafeChannelAccountSnapshotFields } from "./account-snapshot-fields.js";
|
|
|
|
describe("projectSafeChannelAccountSnapshotFields", () => {
|
|
it("omits webhook and public-key style fields from generic snapshots", () => {
|
|
const snapshot = projectSafeChannelAccountSnapshotFields({
|
|
name: "Primary",
|
|
tokenSource: "config",
|
|
tokenStatus: "configured_unavailable",
|
|
signingSecretSource: "config", // pragma: allowlist secret
|
|
signingSecretStatus: "configured_unavailable", // pragma: allowlist secret
|
|
webhookUrl: "https://example.com/webhook",
|
|
webhookPath: "/webhook",
|
|
audienceType: "project-number",
|
|
audience: "1234567890",
|
|
publicKey: "pk_live_123",
|
|
});
|
|
|
|
expect(snapshot).toEqual({
|
|
name: "Primary",
|
|
tokenSource: "config",
|
|
tokenStatus: "configured_unavailable",
|
|
signingSecretSource: "config", // pragma: allowlist secret
|
|
signingSecretStatus: "configured_unavailable", // pragma: allowlist secret
|
|
});
|
|
});
|
|
});
|