mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-12 09:24:24 +00:00
* fix(system-manager): show all CPU cores in the overview list The overview CPU card hardcoded cpuPerCore.slice(0, 12), so a 16-thread host showed "16 核" at the top but only C1–C12 below. Render every reported core and allow the list to scroll when it overflows. Fixes #4183 * ci: retrigger lint-and-test after plugin-contract runner shutdown
14 lines
490 B
TypeScript
14 lines
490 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
test("overview CPU cores list renders every reported core and can scroll", () => {
|
|
const source = readFileSync(new URL("./SystemOverviewTab.tsx", import.meta.url), "utf8");
|
|
|
|
assert.doesNotMatch(source, /cpuPerCore\.slice\(/);
|
|
assert.match(
|
|
source,
|
|
/className="grid grid-cols-2 gap-x-3 gap-y-1\.5 max-h-\[\d+px\] overflow-y-auto pr-1 overscroll-contain"/,
|
|
);
|
|
});
|