mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:59:34 +00:00
test(cli): use lightweight clear for gateway discover beacon mock
This commit is contained in:
@@ -143,7 +143,7 @@ describe("gateway-cli coverage", () => {
|
|||||||
},
|
},
|
||||||
])("registers gateway discover and prints $label", async ({ args, expectedOutput }) => {
|
])("registers gateway discover and prints $label", async ({ args, expectedOutput }) => {
|
||||||
resetRuntimeCapture();
|
resetRuntimeCapture();
|
||||||
discoverGatewayBeacons.mockReset();
|
discoverGatewayBeacons.mockClear();
|
||||||
discoverGatewayBeacons.mockResolvedValueOnce([
|
discoverGatewayBeacons.mockResolvedValueOnce([
|
||||||
{
|
{
|
||||||
instanceName: "Studio (OpenClaw)",
|
instanceName: "Studio (OpenClaw)",
|
||||||
@@ -168,7 +168,7 @@ describe("gateway-cli coverage", () => {
|
|||||||
|
|
||||||
it("validates gateway discover timeout", async () => {
|
it("validates gateway discover timeout", async () => {
|
||||||
resetRuntimeCapture();
|
resetRuntimeCapture();
|
||||||
discoverGatewayBeacons.mockReset();
|
discoverGatewayBeacons.mockClear();
|
||||||
await expectGatewayExit(["gateway", "discover", "--timeout", "0"]);
|
await expectGatewayExit(["gateway", "discover", "--timeout", "0"]);
|
||||||
|
|
||||||
expect(runtimeErrors.join("\n")).toContain("gateway discover failed:");
|
expect(runtimeErrors.join("\n")).toContain("gateway discover failed:");
|
||||||
|
|||||||
Reference in New Issue
Block a user