tests/index.jsView |
---|
17 | 17 | tape('basic', async t => { |
18 | 18 | t.plan(2) |
19 | 19 | let message |
20 | 20 | const expectedState = { |
21 | | - '/': Buffer.from('a364c55f9993e0bc63f7155d5eb661ae9ad769d9', 'hex') |
| 21 | + '/': Buffer.from('926de6b7eb39cfa8d7f8a44d1ef191d3bcb765a7', 'hex') |
22 | 22 | } |
23 | 23 | |
24 | 24 | const tree = new RadixTree({ |
25 | 25 | db: db |
46 | 46 | tape('two communicating actors', async t => { |
47 | 47 | t.plan(2) |
48 | 48 | let message |
49 | 49 | const expectedState = { |
50 | | - '/': Buffer.from('9e8d5671e2c7d167e03784e5d9ec36e15747ad95', 'hex') |
| 50 | + '/': Buffer.from('a4c7ceacd8c867ae1d0b472d8bffa3cb10048331', 'hex') |
51 | 51 | } |
52 | 52 | |
53 | 53 | const tree = new RadixTree({ |
54 | 54 | db: db |
87 | 87 | tape('three communicating actors', async t => { |
88 | 88 | t.plan(3) |
89 | 89 | let message |
90 | 90 | const expectedState = { |
91 | | - '/': Buffer.from('840607eafe779858648d3311039f986e68f4752e', 'hex') |
| 91 | + '/': Buffer.from('4633ac4b9f8212e501b6c56906039ec081fbe5a3', 'hex') |
92 | 92 | } |
93 | 93 | |
94 | 94 | const tree = new RadixTree({ |
95 | 95 | db: db |
132 | 132 | tape('three communicating actors, with tick counting', async t => { |
133 | 133 | t.plan(3) |
134 | 134 | let message |
135 | 135 | const expectedState = { |
136 | | - '/': Buffer.from('840607eafe779858648d3311039f986e68f4752e', 'hex') |
| 136 | + '/': Buffer.from('4633ac4b9f8212e501b6c56906039ec081fbe5a3', 'hex') |
137 | 137 | } |
138 | 138 | |
139 | 139 | const tree = new RadixTree({ |
140 | 140 | db: db |
182 | 182 | tape('response caps', async t => { |
183 | 183 | t.plan(3) |
184 | 184 | let message |
185 | 185 | const expectedState = { |
186 | | - '/': Buffer.from('9e8d5671e2c7d167e03784e5d9ec36e15747ad95', 'hex') |
| 186 | + '/': Buffer.from('a4c7ceacd8c867ae1d0b472d8bffa3cb10048331', 'hex') |
187 | 187 | } |
188 | 188 | |
189 | 189 | const tree = new RadixTree({ |
190 | 190 | db: db |
229 | 229 | tape('response caps for errors', async t => { |
230 | 230 | t.plan(3) |
231 | 231 | let message |
232 | 232 | const expectedState = { |
233 | | - '/': Buffer.from('9e8d5671e2c7d167e03784e5d9ec36e15747ad95', 'hex') |
| 233 | + '/': Buffer.from('a4c7ceacd8c867ae1d0b472d8bffa3cb10048331', 'hex') |
234 | 234 | } |
235 | 235 | |
236 | 236 | const tree = new RadixTree({ |
237 | 237 | db: db |
276 | 276 | tape('actor creation', async t => { |
277 | 277 | t.plan(2) |
278 | 278 | let message |
279 | 279 | const expectedState = { |
280 | | - '/': Buffer.from('b19c67aea0ff97e96df6e2aacbd45b1bd260af30', 'hex') |
| 280 | + '/': Buffer.from('f47377a763c91247e62138408d706a09bccaaf36', 'hex') |
281 | 281 | } |
282 | 282 | |
283 | 283 | const tree = new RadixTree({ |
284 | 284 | db: db |
320 | 320 | |
321 | 321 | tape('simple message arbiter test', async t => { |
322 | 322 | t.plan(4) |
323 | 323 | const expectedState = { |
324 | | - '/': Buffer.from('9e8d5671e2c7d167e03784e5d9ec36e15747ad95', 'hex') |
| 324 | + '/': Buffer.from('a4c7ceacd8c867ae1d0b472d8bffa3cb10048331', 'hex') |
325 | 325 | } |
326 | 326 | |
327 | 327 | const tree = new RadixTree({ |
328 | 328 | db: db |
382 | 382 | tape('arbiter test for id comparision', async t => { |
383 | 383 | t.plan(4) |
384 | 384 | let message |
385 | 385 | const expectedState = { |
386 | | - '/': Buffer.from('840607eafe779858648d3311039f986e68f4752e', 'hex') |
| 386 | + '/': Buffer.from('4633ac4b9f8212e501b6c56906039ec081fbe5a3', 'hex') |
387 | 387 | } |
388 | 388 | |
389 | 389 | const tree = new RadixTree({ |
390 | 390 | db: db |
443 | 443 | |
444 | 444 | tape('basic tagged caps', async t => { |
445 | 445 | t.plan(4) |
446 | 446 | const expectedState = { |
447 | | - '/': Buffer.from('d4291da4536544bf90aa473a1148cb29f913d078', 'hex') |
| 447 | + '/': Buffer.from('b8eb399087a990e30373e954b627a9512c9af40b', 'hex') |
448 | 448 | } |
449 | 449 | |
450 | 450 | const tree = new RadixTree({ |
451 | 451 | db: db |
488 | 488 | |
489 | 489 | tape('return while waiting for tag', async t => { |
490 | 490 | t.plan(4) |
491 | 491 | const expectedState = { |
492 | | - '/': Buffer.from('d4291da4536544bf90aa473a1148cb29f913d078', 'hex') |
| 492 | + '/': Buffer.from('b8eb399087a990e30373e954b627a9512c9af40b', 'hex') |
493 | 493 | } |
494 | 494 | |
495 | 495 | const tree = new RadixTree({ |
496 | 496 | db: db |
536 | 536 | |
537 | 537 | tape('trying to listen for caps more then once', async t => { |
538 | 538 | t.plan(4) |
539 | 539 | const expectedState = { |
540 | | - '/': Buffer.from('d4291da4536544bf90aa473a1148cb29f913d078', 'hex') |
| 540 | + '/': Buffer.from('b8eb399087a990e30373e954b627a9512c9af40b', 'hex') |
541 | 541 | } |
542 | 542 | |
543 | 543 | const tree = new RadixTree({ |
544 | 544 | db: db |
586 | 586 | |
587 | 587 | tape('multple messages to restore on waiting for tags', async t => { |
588 | 588 | t.plan(6) |
589 | 589 | const expectedState = { |
590 | | - '/': Buffer.from('b5c0822ccb21bbaa2ad8069c4dcd18add7d6e2d1', 'hex') |
| 590 | + '/': Buffer.from('b2025e9430f0ce3a53767a36124fa622f782a38f', 'hex') |
591 | 591 | } |
592 | 592 | |
593 | 593 | const tree = new RadixTree({ |
594 | 594 | db: db |
646 | 646 | |
647 | 647 | tape('multple messages to backup on waiting for tags', async t => { |
648 | 648 | t.plan(6) |
649 | 649 | const expectedState = { |
650 | | - '/': Buffer.from('b5c0822ccb21bbaa2ad8069c4dcd18add7d6e2d1', 'hex') |
| 650 | + '/': Buffer.from('b2025e9430f0ce3a53767a36124fa622f782a38f', 'hex') |
651 | 651 | } |
652 | 652 | |
653 | 653 | const tree = new RadixTree({ |
654 | 654 | db: db |
705 | 705 | |
706 | 706 | tape('multple messages, but single tag', async t => { |
707 | 707 | t.plan(6) |
708 | 708 | const expectedState = { |
709 | | - '/': Buffer.from('b5c0822ccb21bbaa2ad8069c4dcd18add7d6e2d1', 'hex') |
| 709 | + '/': Buffer.from('b2025e9430f0ce3a53767a36124fa622f782a38f', 'hex') |
710 | 710 | } |
711 | 711 | |
712 | 712 | const tree = new RadixTree({ |
713 | 713 | db: db |
764 | 764 | |
765 | 765 | tape('deadlock test', async t => { |
766 | 766 | t.plan(7) |
767 | 767 | const expectedState = { |
768 | | - '/': Buffer.from('f290945ad63dd06b9ada924fa5149df4a0a32f53', 'hex') |
| 768 | + '/': Buffer.from('54f55756d0255d849e6878cc706f4c1565396e5c', 'hex') |
769 | 769 | } |
770 | 770 | |
771 | 771 | const tree = new RadixTree({ |
772 | 772 | db: db |