Skip to content

Commit 4c4c0eb

Browse files
committed
test(ink-compat): stabilize stream shorthand lifecycle contract
1 parent 6376b8e commit 4c4c0eb

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +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-
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-
}
76+
await flushTurns(8);
77+
assert.equal(app.stdout, stdout);
78+
assert.equal(app.stderr, process.stderr);
79+
assert.equal(app.stdin, process.stdin);
80+
81+
const output = stripAnsi(stdout.output());
82+
if (output.length > 0) {
83+
assert.match(output, /short/);
8384
}
84-
assert.match(output, /short/);
8585

8686
app.unmount();
8787
app.cleanup();

0 commit comments

Comments
 (0)