Files
Netcatty/components/terminal/TerminalServerStats.test.ts
T
陈大猫 d9b0a06569 Keep non-hibernated tabs active in the background (#2255)
* fix: keep non-hibernated tabs active in background

* fix: scope background work to hibernation policy

* fix: bind background monitoring to its tab

* fix: measure hidden local workspaces
2026-07-16 17:51:21 +08:00

20 lines
667 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
test("CPU per-core stats list can scroll when many cores are reported", () => {
const source = readFileSync(new URL("./TerminalServerStats.tsx", import.meta.url), "utf8");
assert.match(
source,
/className="grid gap-1\.5 max-h-\[\d+px\] overflow-y-auto/,
);
});
test("server stats stay subscribed while the terminal is in the background", () => {
const source = readFileSync(new URL("./TerminalServerStats.tsx", import.meta.url), "utf8");
assert.doesNotMatch(source, /usePaneVisible/);
assert.doesNotMatch(source, /isVisible,/);
});