-
Notifications
You must be signed in to change notification settings - Fork 0
/
open_test.ts
48 lines (46 loc) · 1.09 KB
/
open_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
41
42
43
44
45
46
47
48
import { OpenRequest } from "./open.ts";
Deno.test("agent-A -> DAB", () => {
OpenRequest.parse({
"type": "openRequest",
"payload": {
"app": {
"appId": "myApp",
"desktopAgent": "agent-B",
},
"context": {
"type": "fdc3.nothing",
},
},
"meta": {
"requestGuid": "99c3a032-ad75-4193-8d65-7801a31f22a4",
"timestamp": "2023-05-22T18:29:01.934Z",
"source": {
"appId": "AChatApp",
"instanceId": "02e575aa-4c3a-4b66-acad-155073be21f6",
},
},
});
});
Deno.test("DAB -> agent-B", () => {
OpenRequest.parse({
"type": "openRequest",
"payload": {
"app": {
"appId": "myApp",
"desktopAgent": "DesktopAgentB",
},
"context": {
"type": "fdc3.nothing",
},
},
"meta": {
"requestGuid": "99c3a032-ad75-4193-8d65-7801a31f22a4",
"timestamp": "2023-05-22T18:29:01.934Z",
"source": {
"appId": "AChatApp",
"instanceId": "02e575aa-4c3a-4b66-acad-155073be21f6",
"desktopAgent": "agent-A", //added by DAB
},
},
});
});