forked from phenom/healer-man
Release Healer Man 0.1.43
This commit is contained in:
1 parent
c7e8163790
commit
ccc01396cd
86 files changed
+2951
-198
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { THOR_DISPLAYS, THOR_UI_PIXELS_PER_INCH } from "./thorDisplayProfile";
|
||||
|
||||
describe("Thor physical display sizing", () => {
|
||||
it("uses millimetres for relative panel size, with equal physical touch targets", () => {
|
||||
const { top, bottom } = THOR_DISPLAYS;
|
||||
expect(top.widthMm).toBeCloseTo(132.83, 1);
|
||||
expect(bottom.widthMm).toBeCloseTo(75.12, 1);
|
||||
expect(bottom.cssWidth / top.cssWidth).toBeCloseTo(bottom.widthMm / top.widthMm, 2);
|
||||
expect(bottom.deviceScaleFactor).toBeGreaterThan(top.deviceScaleFactor);
|
||||
for (const panel of [top, bottom]) {
|
||||
expect(44 * panel.deviceScaleFactor / panel.pixelsPerInch * 25.4).toBeCloseTo(44 / THOR_UI_PIXELS_PER_INCH * 25.4);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user