mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 18:07:24 +01:00
web_ui: bump npm pins to newest stable
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
ts_config tests / test (push) Has been cancelled
ts_core tests / test (push) Has been cancelled
web_ui tests / test (push) Has been cancelled
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
ts_config tests / test (push) Has been cancelled
ts_core tests / test (push) Has been cancelled
web_ui tests / test (push) Has been cancelled
jsdom 31 rounds style numbers to 4 decimals; the range slider test now compares percentages numerically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWYDm7szKeXoi7rinEy
This commit is contained in:
parent
3017bbf220
commit
f71b0532fd
@ -9,7 +9,7 @@
|
||||
"node": ">=24",
|
||||
"pnpm": ">=10"
|
||||
},
|
||||
"packageManager": "pnpm@12.16.1+sha512.091d1dee7927575661b25dab3c2ae31cafc1c54d6b71ed6a6600cf0c1cb10434a447eae14015f1b23e2e6bedeed79df94a932e2164d2832280dce3fb32f656d1",
|
||||
"packageManager": "pnpm@12.18.0+sha512.9d7882d5dc82147ecfc4e062aa34834e0ad0296710a1837a1115ae012127d36b7109e321ac1598a1dd0a65597681b1e99917e12ed0d749eae91187943363beb3",
|
||||
"files": [
|
||||
"dist",
|
||||
"src/*.astro"
|
||||
@ -33,7 +33,7 @@
|
||||
"coverage": "vitest run --coverage"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": ">=7.4.0"
|
||||
"astro": "7.4.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "0.9.12",
|
||||
@ -43,12 +43,12 @@
|
||||
"@testing-library/jest-dom": "7.0.1",
|
||||
"@testing-library/user-event": "14.6.8",
|
||||
"@types/node": "26.6.6",
|
||||
"@vitest/coverage-v8": "5.0.5",
|
||||
"astro": "7.4.4",
|
||||
"@vitest/coverage-v8": "5.1.0",
|
||||
"astro": "7.4.7",
|
||||
"eslint": "10.14.0",
|
||||
"jsdom": "30.1.3",
|
||||
"jsdom": "31.0.0",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.72.1",
|
||||
"vitest": "5.0.5"
|
||||
"vitest": "5.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -45,11 +45,13 @@ describe("rendering", () => {
|
||||
|
||||
it("positions the thumbs and the fill from lo and hi", () => {
|
||||
const { element } = mount({ hi: "70", lo: "20" });
|
||||
expect(thumb(element, "lo").style.left).toBe(`${String((2 / 9) * 100)}%`);
|
||||
expect(thumb(element, "hi").style.left).toBe(`${String((7 / 9) * 100)}%`);
|
||||
expect(element.querySelector<HTMLElement>(".slider-fill")?.style.left).toBe(
|
||||
`${String((2 / 9) * 100)}%`,
|
||||
);
|
||||
// jsdom 31 rounds serialized style numbers to 4 decimals, so compare numerically.
|
||||
const percent = (value: string): number => Number(value.replace("%", ""));
|
||||
expect(percent(thumb(element, "lo").style.left)).toBeCloseTo((2 / 9) * 100, 3);
|
||||
expect(percent(thumb(element, "hi").style.left)).toBeCloseTo((7 / 9) * 100, 3);
|
||||
expect(
|
||||
percent(element.querySelector<HTMLElement>(".slider-fill")?.style.left ?? ""),
|
||||
).toBeCloseTo((2 / 9) * 100, 3);
|
||||
});
|
||||
|
||||
it("reports lo and hi as the distribution bounds when unconstrained", () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user