mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 14:10:35 +00:00
chore: Fix types in tests 13/N.
This commit is contained in:
@@ -26,7 +26,7 @@ describe("trigger handling", () => {
|
||||
const targetSessionKey = "agent:main:telegram:group:123";
|
||||
const targetSessionId = "session-target";
|
||||
await fs.writeFile(
|
||||
cfg.session.store,
|
||||
cfg.session!.store,
|
||||
JSON.stringify(
|
||||
{
|
||||
[targetSessionKey]: {
|
||||
@@ -85,7 +85,7 @@ describe("trigger handling", () => {
|
||||
const text = Array.isArray(res) ? res[0]?.text : res?.text;
|
||||
expect(text).toBe("⚙️ Agent was aborted.");
|
||||
expect(getAbortEmbeddedPiRunMock()).toHaveBeenCalledWith(targetSessionId);
|
||||
const store = loadSessionStore(cfg.session.store);
|
||||
const store = loadSessionStore(cfg.session!.store);
|
||||
expect(store[targetSessionKey]?.abortedLastRun).toBe(true);
|
||||
expect(getFollowupQueueDepth(targetSessionKey)).toBe(0);
|
||||
});
|
||||
@@ -98,7 +98,7 @@ describe("trigger handling", () => {
|
||||
|
||||
// Seed the target session to ensure the native command mutates it.
|
||||
await fs.writeFile(
|
||||
cfg.session.store,
|
||||
cfg.session!.store,
|
||||
JSON.stringify(
|
||||
{
|
||||
[targetSessionKey]: {
|
||||
@@ -131,7 +131,7 @@ describe("trigger handling", () => {
|
||||
const text = Array.isArray(res) ? res[0]?.text : res?.text;
|
||||
expect(text).toContain("Model set to openai/gpt-4.1-mini");
|
||||
|
||||
const store = loadSessionStore(cfg.session.store);
|
||||
const store = loadSessionStore(cfg.session!.store);
|
||||
expect(store[targetSessionKey]?.providerOverride).toBe("openai");
|
||||
expect(store[targetSessionKey]?.modelOverride).toBe("gpt-4.1-mini");
|
||||
expect(store[slashSessionKey]).toBeUndefined();
|
||||
|
||||
Reference in New Issue
Block a user