diff --git a/test/fixtures/erase-once-with-static.tsx b/test/fixtures/erase-once-with-static.tsx
index b8669fa34..9dfac4d72 100644
--- a/test/fixtures/erase-once-with-static.tsx
+++ b/test/fixtures/erase-once-with-static.tsx
@@ -1,3 +1,4 @@
+import process from 'node:process';
import React, {useState} from 'react';
import {Box, Static, Text, render, useInput} from '../../src/index.js';
@@ -28,4 +29,5 @@ function Test() {
);
}
+process.stdout.rows = Number(process.argv[2]);
render();
diff --git a/test/fixtures/erase-once.tsx b/test/fixtures/erase-once.tsx
index ee37d3d55..267702c0e 100644
--- a/test/fixtures/erase-once.tsx
+++ b/test/fixtures/erase-once.tsx
@@ -1,3 +1,4 @@
+import process from 'node:process';
import React, {useState} from 'react';
import {Box, Text, render, useInput} from '../../src/index.js';
@@ -22,4 +23,5 @@ function Test() {
);
}
+process.stdout.rows = Number(process.argv[2]);
render();
diff --git a/test/render.tsx b/test/render.tsx
index 45e5764c4..4d38967e9 100644
--- a/test/render.tsx
+++ b/test/render.tsx
@@ -114,10 +114,9 @@ test.serial('erase screen', async t => {
});
test.serial('erase screen once then continue rendering as usual', async t => {
- const ps = term('erase-once', [], {rows: 3});
+ const ps = term('erase-once', ['3']);
await delay(1000);
- t.true(ps.output.includes(ansiEscapes.clearTerminal));
t.true(ps.output.includes('A'));
t.true(ps.output.includes('B'));
t.true(ps.output.includes('C'));
@@ -137,10 +136,9 @@ test.serial('erase screen once then continue rendering as usual', async t => {
test.serial(
'erase screen once then continue rendering as usual with present',
async t => {
- const ps = term('erase-once-with-static', [], {rows: 3});
+ const ps = term('erase-once-with-static', ['3']);
await delay(1000);
- t.true(ps.output.includes(ansiEscapes.clearTerminal));
t.true(ps.output.includes('X'));
t.true(ps.output.includes('Y'));
t.true(ps.output.includes('Z'));