mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 01:28:27 +00:00
test: group remaining suite cleanups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
addSubagentRunForTests,
|
||||
listSubagentRunsForRequester,
|
||||
@@ -41,7 +41,13 @@ const waitForCalls = async (getCount: () => number, count: number, timeoutMs = 2
|
||||
);
|
||||
};
|
||||
|
||||
let sessionsModule: typeof import("../config/sessions.js");
|
||||
|
||||
describe("sessions tools", () => {
|
||||
beforeAll(async () => {
|
||||
sessionsModule = await import("../config/sessions.js");
|
||||
});
|
||||
|
||||
it("uses number (not integer) in tool schemas for Gemini compatibility", () => {
|
||||
const tools = createOpenClawTools();
|
||||
const byName = (name: string) => {
|
||||
@@ -767,7 +773,6 @@ describe("sessions tools", () => {
|
||||
startedAt: now - 2 * 60_000,
|
||||
});
|
||||
|
||||
const sessionsModule = await import("../config/sessions.js");
|
||||
const loadSessionStoreSpy = vi
|
||||
.spyOn(sessionsModule, "loadSessionStore")
|
||||
.mockImplementation(() => ({
|
||||
@@ -827,7 +832,6 @@ describe("sessions tools", () => {
|
||||
startedAt: Date.now() - 60_000,
|
||||
});
|
||||
|
||||
const sessionsModule = await import("../config/sessions.js");
|
||||
const loadSessionStoreSpy = vi
|
||||
.spyOn(sessionsModule, "loadSessionStore")
|
||||
.mockImplementation(() => ({
|
||||
|
||||
Reference in New Issue
Block a user