MCPcopy Create free account
hub / github.com/TanStack/ai / createErrorChunks

Function createErrorChunks

packages/ai-svelte/tests/create-generation.test.ts:75–90  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

73
74// Helper to create error stream chunks
75function createErrorChunks(message: string): Array<StreamChunk> {
76 return [
77 {
78 type: EventType.RUN_STARTED,
79 runId: 'run-1',
80 threadId: 'thread-1',
81 timestamp: Date.now(),
82 },
83 {
84 type: EventType.RUN_ERROR,
85 message,
86 error: { message },
87 timestamp: Date.now(),
88 },
89 ]
90}
91
92describe('createGeneration', () => {
93 beforeEach(() => {

Callers 1

Calls 1

nowMethod · 0.80

Tested by

no test coverage detected