Files
dsh-purge/test/boot-locate.test.js
T
叫我小杨同学andCursor 55f1431a38 fix: 把误删的 test 加回 1.1.70
恢复 bash/identity/override 三份测试,补上 boot-locate,并按当前 ChatML 布局改断言。版本仍是 1.1.70。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 18:05:45 +08:00

17 lines
721 B
JavaScript

import assert from "node:assert/strict";
import test from "node:test";
import { findDesktopAppExecutable, listDesktopPackageRoots } from "../lib/desktop.js";
import { restoreMissingOriginalsAllHosts } from "../lib/core.js";
test("boot desktop locate stays cheap without PowerShell discovery", () => {
const t0 = Date.now();
const roots = listDesktopPackageRoots({ discover: false });
const exe = findDesktopAppExecutable({ discover: false });
const restored = restoreMissingOriginalsAllHosts({ boot: true });
const ms = Date.now() - t0;
assert.ok(Array.isArray(roots));
assert.equal(typeof exe, "string");
assert.ok(Array.isArray(restored));
assert.ok(ms < 1500, `cheap boot locate took ${ms}ms`);
});