mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 10:41:23 +00:00
fix: restore main type gates
This commit is contained in:
@@ -208,7 +208,9 @@ const createRedirectResponse = (location: string, status = 302) =>
|
||||
new Response(null, { status, headers: { location } });
|
||||
|
||||
const createOkFetchMock = (contentType: string, payload = "png") =>
|
||||
vi.fn(async () => createBufferResponse(payload, contentType));
|
||||
vi.fn(async (_input: RequestInfo | URL, _init?: RequestInit) =>
|
||||
createBufferResponse(payload, contentType),
|
||||
);
|
||||
const asFetchFn = (fetchFn: unknown): FetchFn => fetchFn as FetchFn;
|
||||
|
||||
const buildDownloadParams = (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { ConfiguredProviderRequest } from "../config/types.provider-request.js";
|
||||
import type { SecretRef } from "../config/types.secrets.js";
|
||||
import {
|
||||
buildProviderRequestDispatcherPolicy,
|
||||
@@ -11,7 +12,6 @@ import {
|
||||
sanitizeConfiguredProviderRequest,
|
||||
sanitizeRuntimeProviderRequestOverrides,
|
||||
} from "./provider-request-config.js";
|
||||
import type { ProviderRequestTransportOverrides } from "./provider-request-config.js";
|
||||
|
||||
describe("provider request config", () => {
|
||||
it("merges discovered, provider, and model headers in precedence order", () => {
|
||||
@@ -360,7 +360,7 @@ describe("provider request config", () => {
|
||||
expect(
|
||||
sanitizeConfiguredProviderRequest({
|
||||
allowPrivateNetwork: true,
|
||||
} as ProviderRequestTransportOverrides),
|
||||
} as ConfiguredProviderRequest),
|
||||
).toBeUndefined();
|
||||
});
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ describe("exec-policy CLI", () => {
|
||||
it("does not clobber a newer approvals write during rollback", async () => {
|
||||
const originalApprovals = structuredClone(mocks.getApprovals());
|
||||
const originalRaw = JSON.stringify(originalApprovals, null, 2);
|
||||
const originalSnapshot: ExecApprovalsSnapshot = {
|
||||
const originalSnapshot = {
|
||||
path: "/tmp/exec-approvals.json",
|
||||
exists: true,
|
||||
raw: originalRaw,
|
||||
|
||||
Reference in New Issue
Block a user