mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 16:38:34 +08:00
* feat: multi-backend support with cloud SaaS proxy routing * feat: route conversation export through cloud proxy on cloud backends * fix: route conversation delete through cloud proxy on cloud backends * fix: forward settings diffs verbatim through cloud proxy save * fix: surface cloud-aware settings sub-pages and gate local-only routes * fix: route secrets settings through cloud proxy on cloud backends * fix: route conversation stop runtime through cloud proxy on cloud backends * fix: re-expose planning agent UI for cloud backends and route plan file reads through cloud proxy * fix: route Display Cost runtime fetch through cloud proxy and ungate local metrics without session API key * fix: handle WAITING_FOR_SANDBOX task status from cloud backends to prevent UI crash * fix: re-expose Public Share in conversation menu for cloud backends * fix: redirect to home when switching backends from a conversation page * fix: hide cloud orgs the API key can't access in backend selector * feat: support running multiple local agent-servers with shared persistence * fix: lint * fix: failing tests
26 lines
811 B
TypeScript
26 lines
811 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { shouldStartMockWorker } from "#/mocks/should-start-mock-worker";
|
|
|
|
describe("shouldStartMockWorker", () => {
|
|
it("starts the worker whenever mock API mode is enabled in the browser", () => {
|
|
expect(shouldStartMockWorker({ mockApi: "true", hasWindow: true })).toBe(
|
|
true,
|
|
);
|
|
});
|
|
|
|
it("does not start the worker when mock API mode is disabled", () => {
|
|
expect(shouldStartMockWorker({ mockApi: "false", hasWindow: true })).toBe(
|
|
false,
|
|
);
|
|
expect(shouldStartMockWorker({ mockApi: undefined, hasWindow: true })).toBe(
|
|
false,
|
|
);
|
|
});
|
|
|
|
it("does not start the worker during server-side rendering", () => {
|
|
expect(shouldStartMockWorker({ mockApi: "true", hasWindow: false })).toBe(
|
|
false,
|
|
);
|
|
});
|
|
});
|