Skip to content

Commit d97dfbe

Browse files
authored
Merge branch 'main' into fix/langgraph-concurrent-requests-and-tool-name-none
2 parents a17bbc3 + 32d60b9 commit d97dfbe

3 files changed

Lines changed: 1424 additions & 209 deletions

File tree

integrations/mastra/typescript/src/__tests__/edge-cases.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { vi } from "vitest";
12
import { EventType } from "@ag-ui/client";
23
import { MastraAgent } from "../mastra";
34
import {
@@ -260,6 +261,7 @@ describe("error handling", () => {
260261
});
261262

262263
it("still emits RUN_FINISHED when getWorkingMemory throws on run finish", async () => {
264+
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
263265
const memory = new FakeMemory();
264266
memory.getWorkingMemory = async () => {
265267
throw new Error("Memory service down");
@@ -270,6 +272,11 @@ describe("error handling", () => {
270272
const events = await collectEvents(agent, makeInput());
271273

272274
expect(events.some((e) => e.type === EventType.RUN_FINISHED)).toBe(true);
275+
expect(warnSpy).toHaveBeenCalledWith(
276+
expect.stringContaining("Failed to emit working memory snapshot"),
277+
expect.any(Error),
278+
);
279+
warnSpy.mockRestore();
273280
});
274281
});
275282

0 commit comments

Comments
 (0)