fix: increase timeout on tests

This commit is contained in:
Nate 2025-09-02 19:40:52 -07:00
parent 42e43dfd39
commit e8ec9b8380
2 changed files with 13 additions and 13 deletions

View file

@ -1,17 +1,17 @@
import { testSingleMode, renderInMode } from "./TUIChat.dualModeHelper.js";
import { renderInMode, testSingleMode } from "./TUIChat.dualModeHelper.js";
describe("TUIChat - @ File Search Tests", () => {
testSingleMode("shows @ character when user types @", "local", async () => {
const { lastFrame, stdin } = renderInMode("local");
// Wait a bit for initial render
await new Promise((resolve) => setTimeout(resolve, 50));
await new Promise((resolve) => setTimeout(resolve, 100));
// Type the @ character to trigger file search
stdin.write("@");
// Wait longer for file search to initialize and display files
await new Promise((resolve) => setTimeout(resolve, 200));
await new Promise((resolve) => setTimeout(resolve, 400));
const frame = lastFrame()!;
@ -34,7 +34,7 @@ describe("TUIChat - @ File Search Tests", () => {
stdin.write("@READ");
// Wait for file search to filter and display results
await new Promise((resolve) => setTimeout(resolve, 100));
await new Promise((resolve) => setTimeout(resolve, 300));
const frame = lastFrame()!;
@ -58,7 +58,7 @@ describe("TUIChat - @ File Search Tests", () => {
stdin.write("@@test");
// Wait for UI update
await new Promise((resolve) => setTimeout(resolve, 100));
await new Promise((resolve) => setTimeout(resolve, 300));
const frame = lastFrame();
@ -80,7 +80,7 @@ describe("TUIChat - @ File Search Tests", () => {
stdin.write("@");
// Wait for potential async operations
await new Promise((resolve) => setTimeout(resolve, 50));
await new Promise((resolve) => setTimeout(resolve, 200));
const frame = lastFrame()!;

View file

@ -8,7 +8,7 @@ describe("TUIChat - Slash Commands Tests", () => {
stdin.write("/");
// Wait a bit for the UI to update
await new Promise((resolve) => setTimeout(resolve, 50));
await new Promise((resolve) => setTimeout(resolve, 200));
const frame = lastFrame();
@ -27,11 +27,11 @@ describe("TUIChat - Slash Commands Tests", () => {
testBothModes("filters slash commands when typing /log", async (mode) => {
const { lastFrame, stdin } = renderInMode(mode);
// Type /log to trigger slash command filtering
// Type /exi to trigger slash command filtering
stdin.write("/exi");
// Wait a bit for the UI to update (allow extra time in both modes)
await new Promise((resolve) => setTimeout(resolve, 200));
await new Promise((resolve) => setTimeout(resolve, 400));
const frame = lastFrame();
@ -50,14 +50,14 @@ describe("TUIChat - Slash Commands Tests", () => {
testBothModes("handles tab key after slash command", async (mode) => {
const { lastFrame, stdin } = renderInMode(mode);
// Type /log and then tab
// Type /exi and then tab
stdin.write("/exi");
await new Promise((resolve) => setTimeout(resolve, 50));
await new Promise((resolve) => setTimeout(resolve, 200));
stdin.write("\t");
await new Promise((resolve) => setTimeout(resolve, 50));
await new Promise((resolve) => setTimeout(resolve, 200));
const frameAfterTab = lastFrame();
@ -81,7 +81,7 @@ describe("TUIChat - Slash Commands Tests", () => {
// Type just /
stdin.write("/");
await new Promise((resolve) => setTimeout(resolve, 200));
await new Promise((resolve) => setTimeout(resolve, 400));
const frame = lastFrame();