Files
thu-maic--openmaic/tests/pbl/v2/use-instructor-stream.test.ts
wehub-resource-sync c48612c494
CI / E2E Tests (push) Has been cancelled
CI / Lint, Typecheck & Unit Tests (push) Has been cancelled
Docs Build / Build docs site (push) Has been cancelled
Publish @openmaic packages / Build, validate & publish (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:23 +08:00

16 lines
538 B
TypeScript

import { describe, expect, it } from 'vitest';
import { assertNotStreamError } from '@/components/scene-renderers/pbl/v2/use-instructor-stream';
describe('PBL v2 — instructor stream errors', () => {
it('surfaces SSE error events instead of silently swallowing them', () => {
expect(() =>
assertNotStreamError({
type: 'error',
code: 'STREAM_ERROR',
message: 'Invalid prompt: messages must not be empty',
}),
).toThrow('STREAM_ERROR: Invalid prompt: messages must not be empty');
});
});