18 lines
602 B
TypeScript
18 lines
602 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("StreamingTokenResponse", () => {
|
|
it("renders the backend-smoothed stream without a second timer buffer", () => {
|
|
const source = readFileSync(
|
|
join(process.cwd(), "features/agent/components/streaming-token-response.tsx"),
|
|
"utf8"
|
|
);
|
|
|
|
expect(source).not.toContain("setInterval");
|
|
expect(source).not.toContain("useState");
|
|
expect(source).not.toContain("streaming-token-response-state");
|
|
expect(source).toContain("{content}");
|
|
});
|
|
});
|