Download src/channels/plugins/normalize/imessage.test.ts from quinnz/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/spaces/quinnz/openclaw/resolve/main/src/channels/plugins/normalize/imessage.test.ts
- Command line
-
hf download hf://spaces/quinnz/openclaw/src/channels/plugins/normalize/imessage.test.ts
-
curl -L -o imessage.test.ts https://huggingface.co/spaces/quinnz/openclaw/resolve/main/src/channels/plugins/normalize/imessage.test.ts
669 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { normalizeIMessageMessagingTarget } from "./imessage.js"; | |
| describe("imessage target normalization", () => { | |
| it("preserves service prefixes for handles", () => { | |
| expect(normalizeIMessageMessagingTarget("sms:+1 (555) 222-3333")).toBe("sms:+15552223333"); | |
| }); | |
| it("drops service prefixes for chat targets", () => { | |
| expect(normalizeIMessageMessagingTarget("sms:chat_id:123")).toBe("chat_id:123"); | |
| expect(normalizeIMessageMessagingTarget("imessage:CHAT_GUID:abc")).toBe("chat_guid:abc"); | |
| expect(normalizeIMessageMessagingTarget("auto:ChatIdentifier:foo")).toBe("chat_identifier:foo"); | |
| }); | |
| }); | |