mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 23:42:56 +00:00
chore: Run pnpm format:fix.
This commit is contained in:
@@ -12,9 +12,7 @@ import type { NostrProfile } from "./config-schema.js";
|
||||
|
||||
// Test private key (DO NOT use in production - this is a known test key)
|
||||
const TEST_HEX_KEY = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef";
|
||||
const TEST_SK = new Uint8Array(
|
||||
TEST_HEX_KEY.match(/.{2}/g)!.map((byte) => parseInt(byte, 16))
|
||||
);
|
||||
const TEST_SK = new Uint8Array(TEST_HEX_KEY.match(/.{2}/g)!.map((byte) => parseInt(byte, 16)));
|
||||
const TEST_PUBKEY = getPublicKey(TEST_SK);
|
||||
|
||||
// ============================================================================
|
||||
@@ -88,7 +86,9 @@ describe("contentToProfile", () => {
|
||||
it("handles empty content", () => {
|
||||
const content: ProfileContent = {};
|
||||
const profile = contentToProfile(content);
|
||||
expect(Object.keys(profile).filter((k) => profile[k as keyof NostrProfile] !== undefined)).toHaveLength(0);
|
||||
expect(
|
||||
Object.keys(profile).filter((k) => profile[k as keyof NostrProfile] !== undefined),
|
||||
).toHaveLength(0);
|
||||
});
|
||||
|
||||
it("round-trips profile data", () => {
|
||||
@@ -300,7 +300,7 @@ describe("sanitizeProfileForDisplay", () => {
|
||||
const sanitized = sanitizeProfileForDisplay(profile);
|
||||
|
||||
expect(sanitized.about).toBe(
|
||||
'Check out <img src="x" onerror="alert(1)">'
|
||||
"Check out <img src="x" onerror="alert(1)">",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user