diff --git a/src/components/map/TiledLayer.test.tsx b/src/components/map/TiledLayer.test.tsx index b302103..5f5fbf6 100644 --- a/src/components/map/TiledLayer.test.tsx +++ b/src/components/map/TiledLayer.test.tsx @@ -2,16 +2,7 @@ import { render, screen } from '@testing-library/react'; import TiledLayer from './TiledLayer'; describe('The TiledLayer component ', () => { - test('', () => { - // const tiledLayer = renderer.create( - // - // ); - // const tree = tiledLayer.toJSON(); - // console.log(JSON.stringify(tree)); - + test('exposes the tiles needed per its viewport', () => { const { baseElement } = render( { /> ); -// screen.debug(); + // screen.debug(); expect(baseElement).toMatchInlineSnapshot(`
@@ -37,6 +28,52 @@ describe('The TiledLayer component ', () => {
+`); + }); + + test('adds more tiles when its viewport is updated without removing the previous ones', () => { + const { baseElement, rerender } = render( + + + + ); + rerender( + + + + ); + // screen.debug(); + expect(baseElement).toMatchInlineSnapshot(` + +
+ + + + + + + + +
+ `); }); });