mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-14 08:04:17 +00:00
test: clear lmstudio broad matchers
This commit is contained in:
@@ -166,12 +166,12 @@ describe("lmstudio-models", () => {
|
||||
).toEqual({
|
||||
supportsReasoningEffort: true,
|
||||
supportedReasoningEfforts: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
||||
reasoningEffortMap: expect.objectContaining({
|
||||
reasoningEffortMap: {
|
||||
off: "none",
|
||||
none: "none",
|
||||
adaptive: "xhigh",
|
||||
max: "xhigh",
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
@@ -186,10 +186,10 @@ describe("lmstudio-models", () => {
|
||||
).toEqual({
|
||||
supportsReasoningEffort: true,
|
||||
supportedReasoningEfforts: ["low", "medium", "high"],
|
||||
reasoningEffortMap: expect.objectContaining({
|
||||
reasoningEffortMap: {
|
||||
adaptive: "high",
|
||||
max: "high",
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
@@ -248,14 +248,16 @@ describe("lmstudio-models", () => {
|
||||
fetchImpl: asFetch(fetchMock),
|
||||
});
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledWith(
|
||||
"http://localhost:1234/api/v1/models",
|
||||
expect.objectContaining({
|
||||
headers: {
|
||||
Authorization: "Bearer lm-token",
|
||||
},
|
||||
}),
|
||||
const modelsRequest = fetchMock.mock.calls.find(
|
||||
([url]) => url === "http://localhost:1234/api/v1/models",
|
||||
);
|
||||
const modelsRequestOptions = modelsRequest?.[1] as
|
||||
| { headers?: Record<string, string>; signal?: unknown }
|
||||
| undefined;
|
||||
expect(modelsRequestOptions?.headers).toEqual({
|
||||
Authorization: "Bearer lm-token",
|
||||
});
|
||||
expect(modelsRequestOptions?.signal).toBeInstanceOf(AbortSignal);
|
||||
|
||||
expect(models).toHaveLength(2);
|
||||
expect(models[0]).toEqual({
|
||||
@@ -268,12 +270,12 @@ describe("lmstudio-models", () => {
|
||||
supportsUsageInStreaming: true,
|
||||
supportsReasoningEffort: true,
|
||||
supportedReasoningEfforts: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
||||
reasoningEffortMap: expect.objectContaining({
|
||||
reasoningEffortMap: {
|
||||
off: "none",
|
||||
none: "none",
|
||||
adaptive: "xhigh",
|
||||
max: "xhigh",
|
||||
}),
|
||||
},
|
||||
},
|
||||
contextWindow: 262144,
|
||||
contextTokens: LMSTUDIO_DEFAULT_LOAD_CONTEXT_LENGTH,
|
||||
|
||||
Reference in New Issue
Block a user