refactor: simplify zoom by removing zoom.translation (#4477)

This commit is contained in:
David Luzar 2022-01-29 21:12:44 +01:00 committed by GitHub
parent e4edda4555
commit 79d323fab1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 152 additions and 408 deletions

View file

@ -415,16 +415,12 @@ describe("restoreAppState", () => {
);
expect(restoredAppState.zoom.value).toBe(10);
expect(restoredAppState.zoom.translation).toMatchObject(
getDefaultAppState().zoom.translation,
);
});
it("when the zoom of imported data state is not a number", () => {
const stubImportedAppState = getDefaultAppState();
stubImportedAppState.zoom = {
value: 10 as NormalizedZoomValue,
translation: { x: 5, y: 3 },
};
const stubLocalAppState = getDefaultAppState();