bunja 2.1.0 → 3.0.0-alpha.3
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.
- package/README.md +135 -4
- package/bunja.ts +847 -222
- package/deno.json +1 -1
- package/dist/bunja-BJSmIdkQ.cjs +682 -0
- package/dist/{bunja-BKpQTG04.d.cts → bunja-BxbzuHdH.d.cts} +73 -19
- package/dist/bunja-CtHOS4_Q.js +634 -0
- package/dist/{bunja-B_HNgDan.d.ts → bunja-DEFeIlpt.d.ts} +73 -19
- package/dist/bunja.cjs +1 -1
- package/dist/bunja.d.cts +2 -2
- package/dist/bunja.d.ts +2 -2
- package/dist/bunja.js +1 -1
- package/dist/react.cjs +16 -4
- package/dist/react.d.cts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +17 -4
- package/dist/solid.cjs +1 -1
- package/dist/solid.d.cts +2 -2
- package/dist/solid.d.ts +2 -2
- package/dist/solid.js +1 -1
- package/package.json +2 -2
- package/react.ts +34 -8
- package/solid.ts +4 -3
- package/test.ts +434 -4
- package/dist/bunja-BOUkMIz6.js +0 -396
- package/dist/bunja-DFFVW7Gi.cjs +0 -444
package/test.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { assertEquals } from "@std/assert";
|
|
1
|
+
import { assertEquals, assertThrows } from "@std/assert";
|
|
2
2
|
import { assertSpyCalls, spy } from "@std/testing/mock";
|
|
3
3
|
|
|
4
4
|
import { bunja, createBunjaStore, createScope } from "./bunja.ts";
|
|
5
|
+
import type { Bunja, BunjaRef } from "./bunja.ts";
|
|
5
6
|
|
|
6
7
|
const readNull = <T>() => (null as T);
|
|
7
8
|
|
|
@@ -207,7 +208,7 @@ Deno.test({
|
|
|
207
208
|
});
|
|
208
209
|
|
|
209
210
|
Deno.test({
|
|
210
|
-
name: "
|
|
211
|
+
name: "bunja.use can override scope value pairs inside a bunja init",
|
|
211
212
|
fn() {
|
|
212
213
|
const store = createBunjaStore();
|
|
213
214
|
const aaScope = createScope<string>();
|
|
@@ -227,8 +228,8 @@ Deno.test({
|
|
|
227
228
|
return { a, scopeValue };
|
|
228
229
|
});
|
|
229
230
|
const cBunja = bunja(() => {
|
|
230
|
-
const foo = bunja.
|
|
231
|
-
const bar = bunja.
|
|
231
|
+
const foo = bunja.use(bBunja, [aaScope.bind("foo")]);
|
|
232
|
+
const bar = bunja.use(bBunja, [aaScope.bind("bar")]);
|
|
232
233
|
bunja.effect(() => (cMountSpy(), cUnmountSpy));
|
|
233
234
|
return { foo, bar };
|
|
234
235
|
});
|
|
@@ -270,3 +271,432 @@ Deno.test({
|
|
|
270
271
|
assertSpyCalls(cUnmountSpy, 1);
|
|
271
272
|
},
|
|
272
273
|
});
|
|
274
|
+
|
|
275
|
+
Deno.test({
|
|
276
|
+
name: "seed is used only when creating a bunja instance",
|
|
277
|
+
fn() {
|
|
278
|
+
const store = createBunjaStore();
|
|
279
|
+
const myBunja = bunja.withSeed({ value: "default" }, (seed) => ({ seed }));
|
|
280
|
+
|
|
281
|
+
const { value: firstValue, mount: firstMount } = store.get(
|
|
282
|
+
{ bunja: myBunja, seed: { value: "first" } },
|
|
283
|
+
readNull,
|
|
284
|
+
);
|
|
285
|
+
const firstCleanup = firstMount();
|
|
286
|
+
|
|
287
|
+
const { value: secondValue, mount: secondMount } = store.get(
|
|
288
|
+
{ bunja: myBunja, seed: { value: "second" } },
|
|
289
|
+
readNull,
|
|
290
|
+
);
|
|
291
|
+
const secondCleanup = secondMount();
|
|
292
|
+
|
|
293
|
+
assertEquals(firstValue.seed.value, "first");
|
|
294
|
+
assertEquals(secondValue, firstValue);
|
|
295
|
+
|
|
296
|
+
firstCleanup();
|
|
297
|
+
secondCleanup();
|
|
298
|
+
|
|
299
|
+
const { value: thirdValue, mount: thirdMount } = store.get(
|
|
300
|
+
{ bunja: myBunja, seed: { value: "third" } },
|
|
301
|
+
readNull,
|
|
302
|
+
);
|
|
303
|
+
const thirdCleanup = thirdMount();
|
|
304
|
+
|
|
305
|
+
assertEquals(thirdValue.seed.value, "third");
|
|
306
|
+
thirdCleanup();
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
Deno.test({
|
|
311
|
+
name: "bunja.use can provide seed without storing it in graph refs",
|
|
312
|
+
fn() {
|
|
313
|
+
const store = createBunjaStore();
|
|
314
|
+
const seededDependencyBunja = bunja.withSeed(
|
|
315
|
+
{ value: "default" },
|
|
316
|
+
(seed) => seed.value,
|
|
317
|
+
);
|
|
318
|
+
const seededDependencyRef: BunjaRef<string, { value: string }> = {
|
|
319
|
+
bunja: seededDependencyBunja,
|
|
320
|
+
seed: { value: "dependency" },
|
|
321
|
+
};
|
|
322
|
+
const consumerBunja = bunja(() => {
|
|
323
|
+
return bunja.use(seededDependencyRef);
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
const { value, mount } = store.get(consumerBunja, readNull);
|
|
327
|
+
const cleanup = mount();
|
|
328
|
+
|
|
329
|
+
assertEquals(value, "dependency");
|
|
330
|
+
assertEquals(consumerBunja.requiredBunjaRefs.length, 1);
|
|
331
|
+
assertEquals("seed" in consumerBunja.requiredBunjaRefs[0], false);
|
|
332
|
+
|
|
333
|
+
cleanup();
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
Deno.test({
|
|
338
|
+
name: "prebake rejects root seed and initializes with default seed",
|
|
339
|
+
fn() {
|
|
340
|
+
const store = createBunjaStore();
|
|
341
|
+
const usedSeeds: string[] = [];
|
|
342
|
+
const myBunja = bunja.withSeed({ value: "default" }, (seed) => {
|
|
343
|
+
usedSeeds.push(seed.value);
|
|
344
|
+
return seed.value;
|
|
345
|
+
});
|
|
346
|
+
const myRef: BunjaRef<string, { value: string }> = {
|
|
347
|
+
bunja: myBunja,
|
|
348
|
+
seed: { value: "custom" },
|
|
349
|
+
};
|
|
350
|
+
const consumerBunja = bunja(() => bunja.use(myRef));
|
|
351
|
+
|
|
352
|
+
store.prebake(myBunja, readNull);
|
|
353
|
+
store.prebake(consumerBunja, readNull);
|
|
354
|
+
|
|
355
|
+
assertEquals(usedSeeds, ["default", "default"]);
|
|
356
|
+
assertEquals("seed" in consumerBunja.requiredBunjaRefs[0], false);
|
|
357
|
+
assertThrows(
|
|
358
|
+
() => {
|
|
359
|
+
// @ts-expect-error Prebake collects deterministic graph data only.
|
|
360
|
+
store.prebake(myRef, readNull);
|
|
361
|
+
},
|
|
362
|
+
Error,
|
|
363
|
+
"seed cannot be provided to `store.prebake`",
|
|
364
|
+
);
|
|
365
|
+
},
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
Deno.test({
|
|
369
|
+
name: "bunja.will mounts only the selected dependency",
|
|
370
|
+
fn() {
|
|
371
|
+
const store = createBunjaStore();
|
|
372
|
+
const condScope = createScope<"a" | "b">();
|
|
373
|
+
const [aMountSpy, aUnmountSpy] = [spy(), spy()];
|
|
374
|
+
const [bMountSpy, bUnmountSpy] = [spy(), spy()];
|
|
375
|
+
const aBunja = bunja(() => {
|
|
376
|
+
bunja.effect(() => (aMountSpy(), aUnmountSpy));
|
|
377
|
+
return "a";
|
|
378
|
+
});
|
|
379
|
+
const bBunja = bunja(() => {
|
|
380
|
+
bunja.effect(() => (bMountSpy(), bUnmountSpy));
|
|
381
|
+
return "b";
|
|
382
|
+
});
|
|
383
|
+
const consumerBunja = bunja(() => {
|
|
384
|
+
const cond = bunja.use(condScope);
|
|
385
|
+
const getA = bunja.will(aBunja);
|
|
386
|
+
const getB = bunja.will(bBunja);
|
|
387
|
+
return cond === "a" ? getA() : getB();
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
const { value, mount } = store.get(
|
|
391
|
+
consumerBunja,
|
|
392
|
+
<T>() => "a" as T,
|
|
393
|
+
);
|
|
394
|
+
assertEquals(value, "a");
|
|
395
|
+
assertEquals(consumerBunja.relatedBunjas, [aBunja, bBunja]);
|
|
396
|
+
|
|
397
|
+
const cleanup = mount();
|
|
398
|
+
assertSpyCalls(aMountSpy, 1);
|
|
399
|
+
assertSpyCalls(bMountSpy, 0);
|
|
400
|
+
|
|
401
|
+
cleanup();
|
|
402
|
+
assertSpyCalls(aUnmountSpy, 1);
|
|
403
|
+
assertSpyCalls(bUnmountSpy, 0);
|
|
404
|
+
},
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
Deno.test({
|
|
408
|
+
name: "relatedBunjas includes nested bunja.will dependencies",
|
|
409
|
+
fn() {
|
|
410
|
+
const store = createBunjaStore();
|
|
411
|
+
const grandparentDependencyBunja = bunja(() => "grandparent");
|
|
412
|
+
const parentDependencyBunja = bunja(() => {
|
|
413
|
+
bunja.will(grandparentDependencyBunja);
|
|
414
|
+
return "parent";
|
|
415
|
+
});
|
|
416
|
+
const consumerBunja = bunja(() => {
|
|
417
|
+
const getParent = bunja.will(parentDependencyBunja);
|
|
418
|
+
return getParent();
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
const { mount } = store.get(consumerBunja, readNull);
|
|
422
|
+
const cleanup = mount();
|
|
423
|
+
|
|
424
|
+
assertEquals(consumerBunja.relatedBunjas, [
|
|
425
|
+
grandparentDependencyBunja,
|
|
426
|
+
parentDependencyBunja,
|
|
427
|
+
]);
|
|
428
|
+
|
|
429
|
+
cleanup();
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
Deno.test({
|
|
434
|
+
name: "prebake expands inactive bunja.will dependency graph",
|
|
435
|
+
fn() {
|
|
436
|
+
const store = createBunjaStore();
|
|
437
|
+
const grandparentDependencyMountSpy = spy();
|
|
438
|
+
const grandparentDependencyBunja = bunja(() => {
|
|
439
|
+
bunja.effect(() => {
|
|
440
|
+
grandparentDependencyMountSpy();
|
|
441
|
+
});
|
|
442
|
+
return "grandparent";
|
|
443
|
+
});
|
|
444
|
+
const parentDependencyBunja = bunja(() => {
|
|
445
|
+
bunja.will(grandparentDependencyBunja);
|
|
446
|
+
return "parent";
|
|
447
|
+
});
|
|
448
|
+
const consumerBunja = bunja(() => {
|
|
449
|
+
bunja.will(parentDependencyBunja);
|
|
450
|
+
return "consumer";
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
const { value, mount } = store.get(consumerBunja, readNull);
|
|
454
|
+
const cleanup = mount();
|
|
455
|
+
|
|
456
|
+
assertEquals(value, "consumer");
|
|
457
|
+
assertEquals(consumerBunja.relatedBunjas, [parentDependencyBunja]);
|
|
458
|
+
assertSpyCalls(grandparentDependencyMountSpy, 0);
|
|
459
|
+
|
|
460
|
+
const prebaked = store.prebake(consumerBunja, readNull);
|
|
461
|
+
|
|
462
|
+
assertEquals(prebaked.relatedBunjas, [
|
|
463
|
+
grandparentDependencyBunja,
|
|
464
|
+
parentDependencyBunja,
|
|
465
|
+
]);
|
|
466
|
+
assertEquals(consumerBunja.relatedBunjas, [
|
|
467
|
+
grandparentDependencyBunja,
|
|
468
|
+
parentDependencyBunja,
|
|
469
|
+
]);
|
|
470
|
+
assertSpyCalls(grandparentDependencyMountSpy, 0);
|
|
471
|
+
|
|
472
|
+
cleanup();
|
|
473
|
+
},
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
Deno.test({
|
|
477
|
+
name: "prebake runs each dependency once per traversal",
|
|
478
|
+
fn() {
|
|
479
|
+
const store = createBunjaStore();
|
|
480
|
+
const requiredInitSpy = spy();
|
|
481
|
+
const optionalInitSpy = spy();
|
|
482
|
+
const requiredDependencyBunja = bunja(() => {
|
|
483
|
+
requiredInitSpy();
|
|
484
|
+
return "required";
|
|
485
|
+
});
|
|
486
|
+
const optionalDependencyBunja = bunja(() => {
|
|
487
|
+
optionalInitSpy();
|
|
488
|
+
return "optional";
|
|
489
|
+
});
|
|
490
|
+
const consumerBunja = bunja(() => {
|
|
491
|
+
const required = bunja.use(requiredDependencyBunja);
|
|
492
|
+
const getOptional = bunja.will(optionalDependencyBunja);
|
|
493
|
+
return `${required}:${getOptional()}`;
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
store.prebake(consumerBunja, readNull);
|
|
497
|
+
|
|
498
|
+
assertSpyCalls(requiredInitSpy, 1);
|
|
499
|
+
assertSpyCalls(optionalInitSpy, 1);
|
|
500
|
+
|
|
501
|
+
store.prebake(consumerBunja, readNull);
|
|
502
|
+
|
|
503
|
+
assertSpyCalls(requiredInitSpy, 2);
|
|
504
|
+
assertSpyCalls(optionalInitSpy, 2);
|
|
505
|
+
},
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
Deno.test({
|
|
509
|
+
name: "prebake disposes the dry-run wrapper",
|
|
510
|
+
fn() {
|
|
511
|
+
const disposeSpy = spy();
|
|
512
|
+
let wrapCalls = 0;
|
|
513
|
+
const store = createBunjaStore({
|
|
514
|
+
wrapInstance: (fn) => {
|
|
515
|
+
wrapCalls++;
|
|
516
|
+
return fn(disposeSpy);
|
|
517
|
+
},
|
|
518
|
+
});
|
|
519
|
+
const myBunja = bunja(() => "value");
|
|
520
|
+
|
|
521
|
+
store.prebake(myBunja, readNull);
|
|
522
|
+
|
|
523
|
+
assertEquals(wrapCalls, 1);
|
|
524
|
+
assertSpyCalls(disposeSpy, 1);
|
|
525
|
+
},
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
Deno.test({
|
|
529
|
+
name: "bunja.will thunk can only be called during the same bunja init",
|
|
530
|
+
fn() {
|
|
531
|
+
const store = createBunjaStore();
|
|
532
|
+
const parentDependencyBunja = bunja(() => "parent");
|
|
533
|
+
let getParent!: () => string;
|
|
534
|
+
const consumerBunja = bunja(() => {
|
|
535
|
+
getParent = bunja.will(parentDependencyBunja);
|
|
536
|
+
return {};
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
const { mount } = store.get(consumerBunja, readNull);
|
|
540
|
+
const cleanup = mount();
|
|
541
|
+
|
|
542
|
+
assertThrows(
|
|
543
|
+
() => getParent(),
|
|
544
|
+
Error,
|
|
545
|
+
"same bunja init function",
|
|
546
|
+
);
|
|
547
|
+
|
|
548
|
+
cleanup();
|
|
549
|
+
},
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
Deno.test({
|
|
553
|
+
name: "store.get rejects circular bunja dependencies",
|
|
554
|
+
fn() {
|
|
555
|
+
const disposeSpy = spy();
|
|
556
|
+
const store = createBunjaStore({
|
|
557
|
+
wrapInstance: (fn) => fn(disposeSpy),
|
|
558
|
+
});
|
|
559
|
+
let bBunja!: Bunja<string>;
|
|
560
|
+
const aBunja = bunja(() => bunja.use(bBunja));
|
|
561
|
+
bBunja = bunja(() => bunja.use(aBunja));
|
|
562
|
+
|
|
563
|
+
assertThrows(
|
|
564
|
+
() => store.get(aBunja, readNull),
|
|
565
|
+
Error,
|
|
566
|
+
"Circular bunja dependency detected.",
|
|
567
|
+
);
|
|
568
|
+
assertSpyCalls(disposeSpy, 2);
|
|
569
|
+
},
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
Deno.test({
|
|
573
|
+
name: "prebake rejects circular bunja dependencies",
|
|
574
|
+
fn() {
|
|
575
|
+
const store = createBunjaStore();
|
|
576
|
+
let bBunja!: Bunja<string>;
|
|
577
|
+
const aBunja = bunja(() => bunja.use(bBunja));
|
|
578
|
+
bBunja = bunja(() => bunja.use(aBunja));
|
|
579
|
+
|
|
580
|
+
assertThrows(
|
|
581
|
+
() => store.prebake(aBunja, readNull),
|
|
582
|
+
Error,
|
|
583
|
+
"Circular bunja dependency detected.",
|
|
584
|
+
);
|
|
585
|
+
},
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
Deno.test({
|
|
589
|
+
name: "active optional dependency scopes are part of bunja instance identity",
|
|
590
|
+
fn() {
|
|
591
|
+
const store = createBunjaStore();
|
|
592
|
+
const condScope = createScope<boolean>();
|
|
593
|
+
const resourceScope = createScope<string>();
|
|
594
|
+
const mounted: string[] = [];
|
|
595
|
+
const unmounted: string[] = [];
|
|
596
|
+
const parentDependencyBunja = bunja(() => {
|
|
597
|
+
const resource = bunja.use(resourceScope);
|
|
598
|
+
bunja.effect(() => {
|
|
599
|
+
mounted.push(resource);
|
|
600
|
+
return () => unmounted.push(resource);
|
|
601
|
+
});
|
|
602
|
+
return { resource };
|
|
603
|
+
});
|
|
604
|
+
const consumerBunja = bunja(() => {
|
|
605
|
+
const cond = bunja.use(condScope);
|
|
606
|
+
const getParent = bunja.will(parentDependencyBunja);
|
|
607
|
+
return { parent: cond ? getParent() : null };
|
|
608
|
+
});
|
|
609
|
+
const readScope = (resource: string) => <T>(scope: unknown) =>
|
|
610
|
+
(scope === condScope ? true : resource) as T;
|
|
611
|
+
|
|
612
|
+
const first = store.get(consumerBunja, readScope("a"));
|
|
613
|
+
const firstCleanup = first.mount();
|
|
614
|
+
const second = store.get(consumerBunja, readScope("b"));
|
|
615
|
+
const secondCleanup = second.mount();
|
|
616
|
+
|
|
617
|
+
assertEquals(consumerBunja.requiredScopes.length, 1);
|
|
618
|
+
assertEquals(consumerBunja.requiredScopes[0] === condScope, true);
|
|
619
|
+
assertEquals(first.value.parent?.resource, "a");
|
|
620
|
+
assertEquals(second.value.parent?.resource, "b");
|
|
621
|
+
assertEquals(first.value === second.value, false);
|
|
622
|
+
assertEquals(first.deps, [true, "a"]);
|
|
623
|
+
assertEquals(second.deps, [true, "b"]);
|
|
624
|
+
assertEquals(mounted, ["a", "b"]);
|
|
625
|
+
|
|
626
|
+
firstCleanup();
|
|
627
|
+
assertEquals(unmounted, ["a"]);
|
|
628
|
+
secondCleanup();
|
|
629
|
+
assertEquals(unmounted, ["a", "b"]);
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
Deno.test({
|
|
634
|
+
name:
|
|
635
|
+
"inactive optional dependency scopes do not change bunja instance identity",
|
|
636
|
+
fn() {
|
|
637
|
+
const store = createBunjaStore();
|
|
638
|
+
const condScope = createScope<boolean>();
|
|
639
|
+
const resourceScope = createScope<string>();
|
|
640
|
+
const parentDependencyMountSpy = spy();
|
|
641
|
+
const parentDependencyBunja = bunja(() => {
|
|
642
|
+
bunja.use(resourceScope);
|
|
643
|
+
bunja.effect(() => {
|
|
644
|
+
parentDependencyMountSpy();
|
|
645
|
+
});
|
|
646
|
+
return {};
|
|
647
|
+
});
|
|
648
|
+
const consumerBunja = bunja(() => {
|
|
649
|
+
const cond = bunja.use(condScope);
|
|
650
|
+
const getParent = bunja.will(parentDependencyBunja);
|
|
651
|
+
return { parent: cond ? getParent() : null };
|
|
652
|
+
});
|
|
653
|
+
const readScope = (resource: string) => <T>(scope: unknown) =>
|
|
654
|
+
(scope === condScope ? false : resource) as T;
|
|
655
|
+
|
|
656
|
+
const first = store.get(consumerBunja, readScope("a"));
|
|
657
|
+
const second = store.get(consumerBunja, readScope("b"));
|
|
658
|
+
const firstCleanup = first.mount();
|
|
659
|
+
const secondCleanup = second.mount();
|
|
660
|
+
|
|
661
|
+
assertEquals(consumerBunja.requiredScopes.length, 1);
|
|
662
|
+
assertEquals(consumerBunja.requiredScopes[0] === condScope, true);
|
|
663
|
+
assertEquals(first.value, second.value);
|
|
664
|
+
assertEquals(first.deps, [false]);
|
|
665
|
+
assertEquals(second.deps, [false]);
|
|
666
|
+
assertSpyCalls(parentDependencyMountSpy, 0);
|
|
667
|
+
|
|
668
|
+
firstCleanup();
|
|
669
|
+
secondCleanup();
|
|
670
|
+
},
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
Deno.test({
|
|
674
|
+
name: "duplicate optional dependency calls are mounted once",
|
|
675
|
+
fn() {
|
|
676
|
+
const store = createBunjaStore();
|
|
677
|
+
const mountSpy = spy();
|
|
678
|
+
const parentDependencyValue = {};
|
|
679
|
+
const parentDependencyBunja = bunja(() => {
|
|
680
|
+
bunja.effect(() => {
|
|
681
|
+
mountSpy();
|
|
682
|
+
});
|
|
683
|
+
return parentDependencyValue;
|
|
684
|
+
});
|
|
685
|
+
const consumerBunja = bunja(() => {
|
|
686
|
+
const getParent = bunja.will(parentDependencyBunja);
|
|
687
|
+
return {
|
|
688
|
+
first: getParent(),
|
|
689
|
+
second: getParent(),
|
|
690
|
+
};
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
const { value, mount } = store.get(consumerBunja, readNull);
|
|
694
|
+
const cleanup = mount();
|
|
695
|
+
|
|
696
|
+
assertEquals(value.first, parentDependencyValue);
|
|
697
|
+
assertEquals(value.second, parentDependencyValue);
|
|
698
|
+
assertSpyCalls(mountSpy, 1);
|
|
699
|
+
|
|
700
|
+
cleanup();
|
|
701
|
+
},
|
|
702
|
+
});
|