Skip to content

Commit 6376b8e

Browse files
committed
test(ink-compat): harden stream shorthand lifecycle assertion
1 parent 40afc75 commit 6376b8e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

packages/ink-compat/src/__tests__/lifecycle.behavior.test.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,15 @@ test("lifecycle_render_with_stream_shorthand (IKINV-009)", async () => {
7373
const stdout = new MemoryWriteStream({ isTTY: false, columns: 80 });
7474
const app = render(<Text>short</Text>, stdout);
7575

76-
await flushTurns();
77-
assert.match(stripAnsi(stdout.output()), /short/);
76+
let output = "";
77+
for (let index = 0; index < 40; index++) {
78+
await flushTurns(1);
79+
output = stripAnsi(stdout.output());
80+
if (output.length > 0) {
81+
break;
82+
}
83+
}
84+
assert.match(output, /short/);
7885

7986
app.unmount();
8087
app.cleanup();

0 commit comments

Comments
 (0)