@rootintf/protocol-subverseinfo 1.0.9-api.2 → 2.0.1-api.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,28 +13,35 @@ Object.defineProperty(globalThis, 'crypto', {
13
13
  // import { JSON_Msg, JSON_Msg_msg } from '@rootintf/json-msg';
14
14
  import {
15
15
  JSON_MsgSubverseInfo_query,
16
- JSON_MsgSubverseInfo_expanse,
16
+ JSON_MsgSubverseInfo_subverse,
17
+ JSON_MsgSubverseInfo_instances,
17
18
  l as l_
18
- } from '../src/subverseinfo.mjs';
19
+ } from '../dist/subverseinfo.es.mjs';
19
20
 
20
21
  import { LOGR, l_LL } from '@knev/bitlogr';
21
22
 
22
- const kstr_VERSION = "2"
23
+ const kstr_VERSION = "4"
24
+
25
+ //-------------------------------------------------------------------------------------------------
23
26
 
24
27
  const LOGR_= LOGR.get_instance();
28
+
29
+ LOGR_.labels= l_;
25
30
  LOGR_.toggled= {
26
- VALIDATION : true
31
+ // VALIDATION : true
27
32
  }
28
33
 
29
34
  //-------------------------------------------------------------------------------------------------
30
35
 
31
36
  const json_MsgSubverseInfo_query = {
32
- "id": "611aeb54-9d2c-4dd9-9a39-e5d95627cc82",
33
- "referer": [
34
- "subverse-protocol-map",
35
- "c8961cab-1aeb-4d9e-9cf2-ce94e6b3ef7f"
36
- ],
37
- "dt": "2025-03-05T07:52:01.209Z",
37
+ // we should be parsing to make sure it is a JSON_msg beforehand
38
+ //
39
+ // "id": "611aeb54-9d2c-4dd9-9a39-e5d95627cc82",
40
+ // "referer": [
41
+ // "subverse-protocol-map",
42
+ // "c8961cab-1aeb-4d9e-9cf2-ce94e6b3ef7f"
43
+ // ],
44
+ // "dt": "2025-03-05T07:52:01.209Z",
38
45
  "query": {
39
46
  "name": "discovery-expanse",
40
47
  "graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
@@ -43,12 +50,35 @@ const json_MsgSubverseInfo_query = {
43
50
  "subverse_info": kstr_VERSION
44
51
  }
45
52
 
53
+ const json_MsgSubverseInfo_query_incomplete = {
54
+ "query": {
55
+ },
56
+ "subverse_info": kstr_VERSION
57
+ }
58
+
46
59
  describe("Validate query;", function () {
60
+ it("null", function () {
61
+ expect(JSON_MsgSubverseInfo_query.validate(null)).toBe(false); // null should fail
62
+ });
63
+
47
64
  it("raw", function () {
48
65
  expect(JSON_MsgSubverseInfo_query.validate(json_MsgSubverseInfo_query)).toBe(true);
49
66
  });
50
67
 
51
- it("merge", function () {
68
+ it("merge- FAIL", function () {
69
+ const json = JSON_MsgSubverseInfo_query.merge({
70
+ "query": {
71
+ "name": "discovery-expanse",
72
+ "graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
73
+ "ttl_msec": "5000"
74
+ },
75
+ });
76
+ // json.referer = [ "karr_referer", "" ];
77
+
78
+ expect(JSON_MsgSubverseInfo_query.validate(json)).toBe(false); // ttl_msec should be int : 5000
79
+ });
80
+
81
+ it("merge- minimum", function () {
52
82
  const json = JSON_MsgSubverseInfo_query.merge({
53
83
  "query": {
54
84
  "name": "discovery-expanse",
@@ -56,71 +86,101 @@ describe("Validate query;", function () {
56
86
  "ttl_msec": 5000
57
87
  },
58
88
  });
59
- json.referer = [ "karr_referer", "" ];
89
+ // json.referer = [ "karr_referer", "" ];
60
90
 
61
91
  expect(JSON_MsgSubverseInfo_query.validate(json)).toBe(true);
62
92
  });
63
93
  });
64
94
 
65
- // const json_msgSubverseInfo_discovery= JSON_MsgSubverseInfo_discovery.create_with_name_graphql(
95
+ // const json_msgSubverseInfo_query= JSON_MsgSubverseInfo_query.create_with_name_graphql(
66
96
  // "discovery-expanse",
67
97
  // "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
68
98
  // 5000
69
99
  // );
70
- // json_msgSubverseInfo_discovery.referer = [ "karr_referer", "" ];
100
+ // json_msgSubverseInfo_query.referer = [ "karr_referer", "" ];
71
101
 
72
102
  // describe("Validation", function () {
73
- // it("JSON_MsgSubverseInfo_discovery.validate(json_msgSubverseInfo_discovery)", function () {
74
- // expect(JSON_MsgSubverseInfo_discovery.validate(json_msgSubverseInfo_discovery)).toBe(true);
103
+ // it("JSON_MsgSubverseInfo_query.validate(json_msgSubverseInfo_query)", function () {
104
+ // expect(JSON_MsgSubverseInfo_query.validate(json_msgSubverseInfo_query)).toBe(true);
75
105
  // });
76
106
  // });
77
107
 
78
108
  //-------------------------------------------------------------------------------------------------
79
109
 
80
- // const json_msgAnnouncement_expanse = {
81
- // "id": "53C2A451-D3E7-4657-932D-22EBF4A823D8",
82
- // "_msg": { "id": "15169a65-94fe-449a-9164-a2e2bdd78c56", "discovery": { "graphql": "query { subverse { name logo(width: 200, height: 200) protocols integrations } }", "ttl_msec": 5000 }, "referer": ["subverse-protocol-map", "4b1ad967-8154-416f-a744-989db452bd76"], "dt": "2023-04-28T10:13:11.642Z" },
83
- // "referer": ["tx-sl", "D41EDF64-6BF9-40D0-B30C-CC6A798B67F2"],
84
- // "dt": "2023-04-28T10:13:11Z",
85
- // "announcement": {
86
- // // "expanse": {
87
- // // "integrations": [
88
- // // { "pkg": "tx-sl", "ppa": "https://root-interface.se/depot", "sha2-384": "c3f3e373de97e8d7f5d9c47096c128fcdcb07fbbb4581d6ab7d32913fe301edec0abb48a0bcf585f167c473b45a24634", "sha3-224": "", "version": "0.2.9" }
89
- // // ],
90
- // // "logo": "http://root-interface.se/depot/tx-sl/img-SL_DLbackground.png",
91
- // // "name": "Second Life",
92
- // // "protocols": ["QuerySubverse", "2PhW", "Discovery"]
93
- // // }
94
- // },
95
- // "_v" : kstr_VERSION
96
- // }
97
-
98
-
99
- // console.log('json_msgAnnouncement_OpenSim', json_msgAnnouncement_OpenSim)
100
-
101
110
  describe("Validate expanse;", function () {
102
111
  it("create_with_msg_merge- minimum", function () {
103
- let json= JSON_MsgSubverseInfo_expanse.create_with_msg_merge(null, {
112
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(null, {
104
113
  expanse : {
105
114
  subverse: {
106
115
  name : "OpenSimulator",
107
116
  uri : "http://opensimulator.org",
108
117
  },
109
- protocols: [
110
- {
111
- id: "secondlife://",
112
- attr: "0r"
113
- }
114
- ]
118
+ protocols: []
119
+ }
120
+ });
121
+ // json.referer = [ "karr_referer", "" ];
122
+
123
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(true);
124
+ });
125
+
126
+ it("create_with_msg_merge- minimum", function () {
127
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(null, {
128
+ expanse : {
129
+ subverse: {
130
+ name : "OpenSimulator",
131
+ uri : "http://opensimulator.org",
132
+ },
133
+ protocols: []
134
+ }
135
+ });
136
+
137
+ expect(JSON_MsgSubverseInfo_instances.validate(json)).toBe(false); // not be mistaken for instances
138
+ });
139
+
140
+ it("create_with_msg_merge- unevaluatedProperties false", function () {
141
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(null, {
142
+ expanse : {
143
+ subverse: {
144
+ name : "OpenSimulator",
145
+ uri : "http://opensimulator.org",
146
+ unknown : "unevaluatedProperties false"
147
+ },
148
+ protocols: []
149
+ }
150
+ });
151
+
152
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(false); // unknown "unknown" attribute
153
+ });
154
+
155
+ it("create_with_msg_merge- invalid ID", function () {
156
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(null, {
157
+ expanse : {
158
+ subverse: {
159
+ uri : "http://opensimulator.org",
160
+ },
161
+ protocols: []
162
+ }
163
+ });
164
+
165
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(false); // missing "name"
166
+ });
167
+
168
+ fit("create_with_msg_merge- json_MsgSubverseInfo_query_incomplete", function () {
169
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(json_MsgSubverseInfo_query_incomplete, {
170
+ expanse : {
171
+ subverse: {
172
+ name : "OpenSimulator",
173
+ uri : "http://opensimulator.org",
174
+ },
175
+ protocols: []
115
176
  }
116
177
  });
117
- json.referer = [ "karr_referer", "" ];
118
178
 
119
- expect(JSON_MsgSubverseInfo_expanse.validate(json)).toBe(true);
179
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(false); // json_MsgSubverseInfo_query_incomplete
120
180
  });
121
181
 
122
- it("create_with_msg_merge- maximum", function () {
123
- let json= JSON_MsgSubverseInfo_expanse.create_with_msg_merge(null, {
182
+ it("create_with_msg_merge- ALL", function () {
183
+ let json= JSON_MsgSubverseInfo_subverse.create_with_cause_merge(null, {
124
184
  expanse : {
125
185
  subverse: {
126
186
  name : "OpenSimulator",
@@ -143,24 +203,67 @@ describe("Validate expanse;", function () {
143
203
  info : {
144
204
  "key" : "value"
145
205
  }
206
+ },
207
+ {
208
+ name : "js-blue",
209
+ uri : "https://ipsme.dev/js-blue/blue.html",
210
+ favicon : "https://ipsme.dev/js-blue/img/js-blue.png"
211
+ },
212
+ {
213
+ name : "js-orange",
214
+ uri : "https://root-interface.se/js-orange/orange.html",
215
+ favicon : "http://root-interface.se/js-orange/img/js-orange.png"
146
216
  }
147
217
  ],
148
218
  info : {
149
219
  "key" : "value"
150
220
  }
151
221
  },
222
+ platforms : [
223
+ {
224
+ "id": "Darwin",
225
+ "archs": [
226
+ "arm64",
227
+ "x86_64"
228
+ ]
229
+ },
230
+ {
231
+ "id": "Windows",
232
+ "archs": [
233
+ "x86",
234
+ "x64"
235
+ ]
236
+ },
237
+ {
238
+ "id": "WebBr",
239
+ "agents": [
240
+ "Firefox",
241
+ "Chrome"
242
+ ]
243
+ }
244
+ ],
152
245
  protocols: [
153
246
  {
154
247
  id: "secondlife://",
155
248
  name : "Second Life protocol",
156
249
  attr: "0r"
157
- }
250
+ },
251
+ {
252
+ id: "",
253
+ name: "Discovery@4",
254
+ attr: "rw"
255
+ },
256
+ {
257
+ id : "",
258
+ name: "Hyperlink",
259
+ attr: "0w"
260
+ }
158
261
  ]
159
262
  }
160
263
  });
161
264
  json.referer = [ "karr_referer", "" ];
162
265
 
163
- expect(JSON_MsgSubverseInfo_expanse.validate(json)).toBe(true);
266
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(true);
164
267
  });
165
268
 
166
269
  it("raw DCL", function () {
@@ -186,7 +289,7 @@ describe("Validate expanse;", function () {
186
289
  }
187
290
  ]
188
291
  },
189
- "_msg": {
292
+ "_cause": {
190
293
  "id": "611aeb54-9d2c-4dd9-9a39-e5d95627cc82",
191
294
  "referer": [
192
295
  "subverse-protocol-map",
@@ -203,39 +306,14 @@ describe("Validate expanse;", function () {
203
306
  "subverse_info": kstr_VERSION
204
307
  }
205
308
 
206
- expect(JSON_MsgSubverseInfo_expanse.validate(json)).toBe(true);
207
- });
208
-
209
- });
210
-
211
-
212
- /*
213
- describe("Validation", function () {
214
- it("JSON_MsgDiscovery.validate(json_msgDiscovery)", function () {
215
- expect(JSON_MsgDiscovery.validate(json_msgDiscovery)).toBe(true);
309
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(true);
216
310
  });
217
- });
218
311
 
219
- describe("Validation", function () {
220
- it("JSON_MsgAnnouncement.validate(json_msgAnnouncement)", function () {
221
- expect(JSON_MsgAnnouncement.validate(json_msgAnnouncement)).toBe(true);
222
- });
223
312
  });
224
313
 
225
- describe("Validation", function () {
226
- it("JSON_MsgAnnouncement.validate(json_msgAnnouncement_msg)", function () {
227
- expect(JSON_MsgAnnouncement.validate(json_msgAnnouncement_msg)).toBe(true);
228
- });
229
- });
230
-
231
- describe("Validation", function () {
232
- it("JSON_MsgAnnouncement.validate(json_msgAnnouncement_expanse)", function () {
233
- expect(JSON_MsgAnnouncement.validate(json_msgAnnouncement_expanse)).toBe(true);
234
- });
235
- });
236
- */
237
314
 
238
315
  //-------------------------------------------------------------------------------------------------
316
+ // TODO ?!@?
239
317
 
240
318
  // protocols are required, except ...
241
319
  // instances don't need protocols, if they are linked to a valid subverse
@@ -243,211 +321,167 @@ describe("Validation", function () {
243
321
  // - if subverse missing, protocols required
244
322
 
245
323
  //-------------------------------------------------------------------------------------------------
246
- // subverses
247
-
248
- // const json_subverse_subverse = {
249
- // "expanse" : {
250
- // "platforms": [
251
- // {
252
- // "name": "Darwin",
253
- // "archs": [
254
- // "arm64",
255
- // "x86_64"
256
- // ]
257
- // },
258
- // {
259
- // "name": "Windows",
260
- // "archs": [
261
- // "x86",
262
- // "x64"
263
- // ]
264
- // },
265
- // {
266
- // "name": "WebBr",
267
- // "agents": [
268
- // "Firefox",
269
- // "Chrome"
270
- // ]
271
- // }
272
- // ],
273
- // "protocols": [
274
- // {
275
- // name: "Discovery@4",
276
- // attr: "rw"
277
- // },
278
- // {
279
- // name: "Hyperlink",
280
- // attr: "0w"
281
- // }
282
- // ]
283
- // }
284
- // }
285
-
286
- // const json_subverse_instances= {
287
- // expanse : {
288
- // instances : [
289
- // {
290
- // name : "js-blue",
291
- // logo : "https://ipsme.dev/js-blue/img/js-blue.png",
292
- // link : "https://ipsme.dev/js-blue/blue.html"
293
- // },
294
- // {
295
- // name : "js-orange",
296
- // logo : "http://root-interface.se/js-orange/img/js-orange.png",
297
- // link : "https://root-interface.se/js-orange/orange.html"
298
- // }
299
- // ],
300
- // locations : {},
301
- // platforms : [
302
- // {
303
- // name: "WebBr",
304
- // agents : [ "Firefox" ]
305
- // }
306
- // ],
307
- // protocols : [
308
- // {
309
- // name: "Hyperlink",
310
- // attr: "0rw"
311
- // },
312
- // {
313
- // name: "2PhW@0.6",
314
- // attr: "0rw"
315
- // }
316
- // ]
317
- // }
318
- // }
319
-
320
- const json_subverse_minimum = {
321
- "expanse" : {
322
- subverse : {
323
- "name": "Decentraland",
324
- "uri" : "",
325
- "map_url": "",
326
- },
327
- "protocols": [
328
- { name: "JanusWeb", attr: "0rw", url: "https://janusvr.com/web.html" },
329
- ]
330
- }
331
- }
324
+ // instances
332
325
 
333
- const json_subverse_minimum_fail = {
334
- "expanse" : {
335
- subverse : {
336
- "name": "Decentraland",
337
- "uri" : "",
338
- // "map-url": "",
339
- },
340
- "protocols": [
341
- { name: "JanusWeb", attr: "0rw", url: "https://janusvr.com/web.html" },
342
- ]
343
- }
344
- }
326
+ describe("Validate instances;", function () {
345
327
 
346
- const json_subverse_ = {
347
- "expanse" : {
348
- subverse : {
349
- "name": "Decentraland",
350
- "uri" : "https://decentraland.org",
351
- map_url : "https://decentraland.org/map",
352
- "favicon" : "",
353
- info : {},
354
- },
355
- instances : [
356
- {
357
- name : "",
358
- uri : "",
359
- info : {}
360
- },
361
- {
362
- name : "",
363
- uri : "",
364
- info : {}
365
- },
366
- ],
367
- platforms : [],
368
- "protocols": []
369
- }
370
- }
328
+ it("create_with_msg_merge- minimum", function () {
329
+ let json= JSON_MsgSubverseInfo_instances.create_with_cause_merge(null, {
330
+ "expanse" : {
331
+ instances : []
332
+ }
333
+ });
371
334
 
372
- /*
373
- describe("Validation", function () {
374
- it("JSON_subverse.validate(json_subverse_minimum)", function () {
375
- expect(JSON_subverse.validate(json_subverse_minimum)).toBe(true);
335
+ expect(JSON_MsgSubverseInfo_instances.validate(json)).toBe(true);
376
336
  });
377
- });
378
337
 
379
- describe("Validation", function () {
380
- it("JSON_subverse.validate(json_subverse_minimum_fail)", function () {
381
- expect(JSON_subverse.validate(json_subverse_minimum_fail)).toBe(false);
338
+ it("create_with_msg_merge- minimum", function () {
339
+ let json= JSON_MsgSubverseInfo_instances.create_with_cause_merge(null, {
340
+ "expanse" : {
341
+ instances : []
342
+ }
343
+ });
344
+
345
+ expect(JSON_MsgSubverseInfo_subverse.validate(json)).toBe(false); // not to be mistaken for subverse
382
346
  });
383
- });
384
347
 
385
- describe("Validation", function () {
386
- it("JSON_subverse.validate(json_subverse_)", function () {
387
- expect(JSON_subverse.validate(json_subverse_)).toBe(true);
348
+ it("create_with_msg_merge- unevaluatedProperties false", function () {
349
+ let json= JSON_MsgSubverseInfo_instances.create_with_cause_merge(null, {
350
+ "expanse" : {
351
+ instances : [],
352
+ subverse : {
353
+ "name": "Decentraland",
354
+ "uri" : "",
355
+ "map_url": "" // unevaluatedProperties false
356
+ }
357
+ }
358
+ });
359
+
360
+ expect(JSON_MsgSubverseInfo_instances.validate(json)).toBe(false); // unevaluatedProperties false
388
361
  });
389
- });
390
- */
391
362
 
392
- //-------------------------------------------------------------------------------------------------
393
- // instances
363
+ it("create_with_msg_merge- ALL", function () {
364
+ let json= JSON_MsgSubverseInfo_instances.create_with_cause_merge(json_MsgSubverseInfo_query, {
365
+ "expanse" : {
366
+ instances : [],
367
+ subverse : {
368
+ "name": "Decentraland",
369
+ "uri" : "",
370
+ },
371
+ platforms : [],
372
+ protocols: []
373
+ }
374
+ });
394
375
 
395
- const json_instance_minimum = {
396
- "expanse" : {
397
- instances : []
398
- }
399
- }
376
+ expect(JSON_MsgSubverseInfo_instances.validate(json)).toBe(true);
377
+ });
400
378
 
401
- const json_instance_minimum_fail = {
402
- "expanse" : {
403
- // instances : []
404
- }
405
- }
379
+ });
406
380
 
407
- const json_instance_ = {
408
- "expanse" : {
409
- instances : [
410
- {
411
- uri : "",
412
- name : "",
413
- favicon : "",
414
- info : {}
415
- },
416
- {
417
- uri : "",
418
- name : "",
419
- },
420
- ],
421
- subverse : {
422
- "name": "Decentraland",
423
- "uri" : "decentraland.org"
424
- },
425
- platforms : [],
426
- "protocols": []
427
- }
381
+ //-------------------------------------------------------------------------------------------------
382
+
383
+ const json_subverse_DCL = {
384
+ "id": "69731f23-b192-4128-9b7e-cd7282020776",
385
+ "referer": [
386
+ "subverse-protocol-map",
387
+ "58f57e33-208f-45b1-b1f6-941af7f6e074"
388
+ ],
389
+ "dt": "2025-12-08T10:09:44.047Z",
390
+ "expanse": {
391
+ "subverse": {
392
+ "uri": "org.decentraland",
393
+ "name": "Decentraland",
394
+ "map-uri": "https://genesis.city",
395
+ "favicon": "https://root-interface.se/DCL/decentraland-logo.svg",
396
+ "hyperport": {
397
+ "uri": "ipsme+https://play.decentraland.org",
398
+ "port": "ipsme+https://play.decentraland.org/?position=32,-144"
399
+ }
400
+ },
401
+ "protocols": [
402
+ {
403
+ "id": "org.ethereum",
404
+ "name": "Ethereum",
405
+ "attr": "0rw"
406
+ }
407
+ ]
408
+ },
409
+ "_msg": {
410
+ "id": "55b9952e-5d80-44a0-83af-104d74cb1a91",
411
+ "referer": [
412
+ "subverse-protocol-map",
413
+ "58f57e33-208f-45b1-b1f6-941af7f6e074"
414
+ ],
415
+ "dt": "2025-12-08T10:09:44.044Z",
416
+ "query": {
417
+ "name": "SubverseInfo-expanse",
418
+ "graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
419
+ "ttl_msec": 5000
420
+ },
421
+ "subverse_info": "4"
422
+ },
423
+ "subverse_info": "4"
428
424
  }
429
425
 
430
- /*
431
- describe("Validation", function () {
432
- it("JSON_instances.validate(json_instance_minimum)", function () {
433
- expect(JSON_instances.validate(json_instance_minimum)).toBe(true);
426
+ const json_instances_oncyber = {
427
+ "id": "9de42f9f-b42c-44ec-949d-5b1f6e7d8b64",
428
+ "referer": [
429
+ "subverse-protocol-map",
430
+ "58f57e33-208f-45b1-b1f6-941af7f6e074"
431
+ ],
432
+ "dt": "2025-12-08T10:09:44.047Z",
433
+ "expanse": {
434
+ "instances": [
435
+ {
436
+ "name": "Angell Lounge",
437
+ "uri": "io.oncyber/angell",
438
+ "favicon": "https://d3i9te5634opuo.cloudfront.net/oncyber.gif"
439
+ }
440
+ ],
441
+ "subverse": {
442
+ "name": "oncyber",
443
+ "uri": "io.oncyber"
444
+ },
445
+ "protocols": [
446
+ {
447
+ "id": "org.whatwg.spec.html",
448
+ "name": "Hyperlink",
449
+ "attr": "0rw"
450
+ }
451
+ ]
452
+ },
453
+ "_msg": {
454
+ "id": "55b9952e-5d80-44a0-83af-104d74cb1a91",
455
+ "referer": [
456
+ "subverse-protocol-map",
457
+ "58f57e33-208f-45b1-b1f6-941af7f6e074"
458
+ ],
459
+ "dt": "2025-12-08T10:09:44.044Z",
460
+ "query": {
461
+ "name": "SubverseInfo-expanse",
462
+ "graphql": "query { expanse { name map logo(width: 200, height: 200) { link } platforms { name archs agents } protocols { name attr } } }",
463
+ "ttl_msec": 5000
464
+ },
465
+ "subverse_info": "4"
466
+ },
467
+ "subverse_info": "4"
468
+ };
469
+
470
+ describe("Validate raw;", function () {
471
+ it("json_subverse_DCL- JSON_MsgSubverseInfo_subverse", function () {
472
+ expect(JSON_MsgSubverseInfo_subverse.validate(json_subverse_DCL)).toBe(true);
434
473
  });
435
- });
436
474
 
437
- describe("Validation", function () {
438
- it("JSON_instances.validate(json_instance_minimum_fail)", function () {
439
- expect(JSON_instances.validate(json_instance_minimum_fail)).toBe(false);
475
+ it("json_subverse_DCL- JSON_MsgSubverseInfo_instances", function () {
476
+ expect(JSON_MsgSubverseInfo_instances.validate(json_subverse_DCL)).toBe(false);
440
477
  });
441
- });
442
478
 
443
- */
444
-
445
- // describe("Validation", function () {
446
- // it("JSON_MsgSubverseInfo_expanse.validate(json_instance_)", function () {
447
- // expect(JSON_MsgSubverseInfo_expanse.validate(json_instance_)).toBe(true);
448
- // });
449
- // });
450
-
451
- //-------------------------------------------------------------------------------------------------
479
+ it("json_instances_oncyber- JSON_MsgSubverseInfo_subverse", function () {
480
+ expect(JSON_MsgSubverseInfo_subverse.validate(json_instances_oncyber)).toBe(false);
481
+ });
452
482
 
483
+ it("json_instances_oncyber- JSON_MsgSubverseInfo_instances", function () {
484
+ expect(JSON_MsgSubverseInfo_instances.validate(json_instances_oncyber)).toBe(true);
485
+ });
453
486
 
487
+ });