style: format daemon program args test

This commit is contained in:
Peter Steinberger
2026-01-05 02:54:08 +01:00
parent aab98a6d18
commit deba1b6739

View File

@@ -22,15 +22,14 @@ afterEach(() => {
describe("resolveGatewayProgramArguments", () => {
it("uses realpath-resolved dist entry when running via npx shim", async () => {
process.argv = [
"node",
"/tmp/.npm/_npx/63c3/node_modules/.bin/clawdbot",
];
process.argv = ["node", "/tmp/.npm/_npx/63c3/node_modules/.bin/clawdbot"];
fsMocks.realpath.mockResolvedValue(
"/tmp/.npm/_npx/63c3/node_modules/clawdbot/dist/entry.js",
);
fsMocks.access.mockImplementation(async (target: string) => {
if (target === "/tmp/.npm/_npx/63c3/node_modules/clawdbot/dist/entry.js") {
if (
target === "/tmp/.npm/_npx/63c3/node_modules/clawdbot/dist/entry.js"
) {
return;
}
throw new Error("missing");
@@ -48,13 +47,12 @@ describe("resolveGatewayProgramArguments", () => {
});
it("falls back to node_modules package dist when .bin path is not resolved", async () => {
process.argv = [
"node",
"/tmp/.npm/_npx/63c3/node_modules/.bin/clawdbot",
];
process.argv = ["node", "/tmp/.npm/_npx/63c3/node_modules/.bin/clawdbot"];
fsMocks.realpath.mockRejectedValue(new Error("no realpath"));
fsMocks.access.mockImplementation(async (target: string) => {
if (target === "/tmp/.npm/_npx/63c3/node_modules/clawdbot/dist/index.js") {
if (
target === "/tmp/.npm/_npx/63c3/node_modules/clawdbot/dist/index.js"
) {
return;
}
throw new Error("missing");