diff --git a/src/app/features/scene/ridge/Ridge.test.ts b/src/app/features/scene/ridge/Ridge.test.ts index f864505e..b96a045c 100644 --- a/src/app/features/scene/ridge/Ridge.test.ts +++ b/src/app/features/scene/ridge/Ridge.test.ts @@ -545,13 +545,14 @@ describe('the ridge cards in the scene', () => { it('keeps the live sky, with every body baked into it, and the twinkle canvas in one plate under the rig; the host canvas is not painted', () => { const { parent, canvas } = host(); - createRidgeScene({ canvas, tier: 'full', sky: { ...night }, backdrop: litCards(), lines: true }); + const s = createRidgeScene({ canvas, tier: 'full', sky: { ...night }, backdrop: litCards(), lines: true })!; const rig = rigOf(parent); const plate = parent.children.find((c: any) => c.children.some((g: any) => g.tag === 'canvas')); expect(plate.children.map((c: any) => c.tag)).toEqual(['canvas', 'canvas']); // the sky, then the twinkle canvas over it expect(parent.children.indexOf(rig)).toBeGreaterThan(parent.children.indexOf(plate)); expect(draws.filter((d) => d === 'image')).toHaveLength(1); // only the plate's sky upscale: nothing in the host canvas, the cards are DOM above the plate expect(live(plate)).toHaveLength(1); // one animation slides it + s.dispose(); }); it('stacks the rig after the twinkle canvas and before the rain, with no z-index and no fixed position, and disposes the backdrop with itself', () => { @@ -1785,9 +1786,10 @@ describe('the ridge cards in the scene', () => { it('with no backdrop it is the sky alone', () => { const { parent, canvas } = host(); - createRidgeScene({ canvas, tier: 'full', sky: DAY }); + const s = createRidgeScene({ canvas, tier: 'full', sky: DAY })!; expect(parent.children).toEqual([canvas]); expect(images.filter((a) => (a[0] as any).id)).toHaveLength(0); + s.dispose(); }); it('asks the host canvas, and every canvas it makes, only for 2d: the tiles arrive lit', () => {