(schema: z.ZodTypeAny)
| 125 | // the schema-gated `partial` / `final` signals are present on the result. |
| 126 | // The shared renderInjectChat harness erases the schema type. |
| 127 | function mountStructuredHost(schema: z.ZodTypeAny) { |
| 128 | const adapter = createMockConnectionAdapter() |
| 129 | |
| 130 | @Component({ standalone: true, template: '' }) |
| 131 | class StructuredHost { |
| 132 | chat = injectChat({ connection: adapter, outputSchema: schema }) |
| 133 | } |
| 134 | const fixture = TestBed.createComponent(StructuredHost) |
| 135 | fixture.detectChanges() |
| 136 | return { |
| 137 | result: fixture.componentInstance.chat, |
| 138 | flush: () => fixture.detectChanges(), |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | it('partial → final transition via setMessages', () => { |
| 143 | const schema = z.object({ title: z.string() }) |
no test coverage detected