Files
openclaw/extensions/cua-computer/src/driver-artifacts-resolution.test.ts
Peter Steinberger abf0ef6513 fix(computer-use): repair artifact verification and post-approval descriptor found by the Linux gate (#124128)
* fix(cua-computer): prove Linux X11 live vertical

* test(computer-use): authenticate isolated Linux rig

* fix(gateway): refresh computer use after node approval

* refactor(cua-computer): resolve the plugin manifest by static import

* fix(gateway): break plugin runtime import cycle

* fix(computer-use): bind live rig to committed helpers
2026-08-15 03:53:23 -07:00

35 lines
1.1 KiB
TypeScript

import { expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({
inspect: vi.fn(() => ({ ok: true, applicable: false }) as const),
}));
vi.mock("./driver-artifact-verification.js", () => ({
inspectCuaDriverArtifacts: mocks.inspect,
readPackageIdentity: vi.fn(),
}));
import { verifyInstalledCuaDriverArtifacts } from "./driver-artifacts.js";
it("supplies the accepted artifact record without depending on the bundled module path", () => {
verifyInstalledCuaDriverArtifacts();
expect(mocks.inspect).toHaveBeenCalledWith(
expect.objectContaining({
pluginManifest: expect.objectContaining({
dependencies: expect.objectContaining({ "@trycua/cua-driver": "0.19.3" }),
cuaDriverArtifacts: expect.objectContaining({
"win32-arm64-msvc": {
files: {
"cua_driver_node_runtime.node":
"fe025669d1614b1ac9a82d1b6a331acd15b44caef81e5bda6a0b02e1d9a4b71f",
"cua_driver_sdk.dll":
"f1f25699dbdcc05169230b8286800b69a10407abb20effd5b767629fe725f21b",
},
},
}),
}),
}),
);
});