Files
Termix/plugins/remote-desktop/tests/frontend/guacamole-zoom.test.ts
T

18 lines
508 B
TypeScript
Raw Normal View History

+17
2026-09-20 14:56:39 -05:00
import { describe, expect, it } from "vitest";
2026-10-01 16:20:16 -05:00
import {
clampGuacamoleZoom,
stepGuacamoleZoom,
} from "../../src/frontend/guacamole-zoom.js";
+17
2026-09-20 14:56:39 -05:00
describe("guacamole zoom", () => {
it("steps in predictable quarter increments", () => {
expect(stepGuacamoleZoom(1, 1)).toBe(1.25);
expect(stepGuacamoleZoom(1, -1)).toBe(0.75);
});
it("keeps toolbar and pinch zoom within usable bounds", () => {
expect(clampGuacamoleZoom(0.1)).toBe(0.5);
expect(clampGuacamoleZoom(8)).toBe(4);
});
});