-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbroadcast_test.ts
40 lines (38 loc) · 1.06 KB
/
broadcast_test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { BroadcastRequest } from "./broadcast.ts";
Deno.test("agent-A -> DAB", () => {
BroadcastRequest.parse({
"type": "broadcastRequest",
"payload": {
"channel": "myChannel",
"context": { type: "fdc3.nothing" },
},
"meta": {
"requestGuid": "99c3a032-ad75-4193-8d65-7801a31f22a4",
"timestamp": "2023-05-22T18:29:01.934Z",
// FIXME: examples have source as array
"source": {
"appId": "agentA-app1",
"instanceId": "c6ad5174-6f78-4582-8e96-728d93a4d7d7",
},
},
});
});
Deno.test("DAB -> agent-B", () => {
BroadcastRequest.parse({
"type": "broadcastRequest",
"payload": {
"channel": "myChannel",
"context": { type: "fdc3.nothing" },
},
"meta": {
"requestGuid": "99c3a032-ad75-4193-8d65-7801a31f22a4",
"timestamp": "2023-05-22T18:29:01.934Z",
// FIXME: examples have source as array
"source": {
"appId": "agentA-app1",
"instanceId": "c6ad5174-6f78-4582-8e96-728d93a4d7d7",
"desktopAgent": "agent-A",
},
},
});
});