From a1b2b5d162d0fc24d2777a5a04b0041fda930455 Mon Sep 17 00:00:00 2001 From: Peter Steven Date: Fri, 31 Jan 2025 09:18:34 +1300 Subject: [PATCH] fix tests for #5406 --- src/ui/camera.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ui/camera.test.ts b/src/ui/camera.test.ts index cdae6fd83a..fda70bb4d5 100644 --- a/src/ui/camera.test.ts +++ b/src/ui/camera.test.ts @@ -3170,7 +3170,7 @@ describe('#flyTo globe projection', () => { test('immediately sets padding with duration = 0', () => { const camera = createCameraGlobe(); - camera.easeTo({center: [100, 0], duration: 0, padding: {left: 100}}); + camera.flyTo({center: [100, 0], duration: 0, padding: {left: 100}}); expect(camera.getPadding()).toEqual({ bottom: 0, left: 100, @@ -3178,7 +3178,6 @@ describe('#flyTo globe projection', () => { top: 0, }); - expect(camera.getCenter()).toEqual({lng: 100, lat: 0}); }); test('smoothly sets given padding with duration > 0', async () => { @@ -3190,7 +3189,7 @@ describe('#flyTo globe projection', () => { camera.flyTo({center: [100, 0], duration: 100, padding: {left: 100}}); - stub.mockImplementation(() => 50); + stub.mockImplementation(() => 100); camera.simulateFrame(); const padding = camera.getPadding();