diff --git a/test/fixtures/erase-once-with-static.tsx b/test/fixtures/erase-once-with-static.tsx
index b8669fa34..0193d8f88 100644
--- a/test/fixtures/erase-once-with-static.tsx
+++ b/test/fixtures/erase-once-with-static.tsx
@@ -1,7 +1,7 @@
import React, {useState} from 'react';
import {Box, Static, Text, render, useInput} from '../../src/index.js';
-function Test() {
+function EraseOnceWithStatic() {
const [fullHeight, setFullHeight] = useState(true);
useInput(
@@ -28,4 +28,4 @@ function Test() {
);
}
-render();
+render();
diff --git a/test/fixtures/erase-once.tsx b/test/fixtures/erase-once.tsx
index ee37d3d55..48c87c5af 100644
--- a/test/fixtures/erase-once.tsx
+++ b/test/fixtures/erase-once.tsx
@@ -1,7 +1,7 @@
import React, {useState} from 'react';
import {Box, Text, render, useInput} from '../../src/index.js';
-function Test() {
+function EraseOnce() {
const [fullHeight, setFullHeight] = useState(true);
useInput(
@@ -22,4 +22,4 @@ function Test() {
);
}
-render();
+render();
diff --git a/test/fixtures/erase-with-static.tsx b/test/fixtures/erase-with-static.tsx
index 4a79ddd14..f5a41d73f 100644
--- a/test/fixtures/erase-with-static.tsx
+++ b/test/fixtures/erase-with-static.tsx
@@ -1,4 +1,3 @@
-import process from 'node:process';
import React from 'react';
import {Static, Box, Text, render} from '../../src/index.js';
@@ -18,5 +17,4 @@ function EraseWithStatic() {
);
}
-process.stdout.rows = Number(process.argv[3]);
render();
diff --git a/test/fixtures/erase.tsx b/test/fixtures/erase.tsx
index c432e897b..8b6d32ddf 100644
--- a/test/fixtures/erase.tsx
+++ b/test/fixtures/erase.tsx
@@ -1,4 +1,3 @@
-import process from 'node:process';
import React from 'react';
import {Box, Text, render} from '../../src/index.js';
@@ -12,5 +11,4 @@ function Erase() {
);
}
-process.stdout.rows = Number(process.argv[2]);
render();
diff --git a/test/render.tsx b/test/render.tsx
index 45e5764c4..2b608003e 100644
--- a/test/render.tsx
+++ b/test/render.tsx
@@ -80,7 +80,7 @@ const term = (
};
test.serial('do not erase screen', async t => {
- const ps = term('erase', ['4']);
+ const ps = term('erase', [], {rows: 4});
await ps.waitForExit();
t.false(ps.output.includes(ansiEscapes.clearTerminal));
@@ -92,7 +92,7 @@ test.serial('do not erase screen', async t => {
test.serial(
'do not erase screen where is taller than viewport',
async t => {
- const ps = term('erase-with-static', ['4']);
+ const ps = term('erase-with-static', [], {rows: 4});
await ps.waitForExit();
t.false(ps.output.includes(ansiEscapes.clearTerminal));
@@ -104,7 +104,7 @@ test.serial(
);
test.serial('erase screen', async t => {
- const ps = term('erase', ['3']);
+ const ps = term('erase', [], {rows: 3});
await ps.waitForExit();
t.true(ps.output.includes(ansiEscapes.clearTerminal));
@@ -117,7 +117,6 @@ test.serial('erase screen once then continue rendering as usual', async t => {
const ps = term('erase-once', [], {rows: 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'));
@@ -140,7 +139,6 @@ test.serial(
const ps = term('erase-once-with-static', [], {rows: 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'));
@@ -164,7 +162,7 @@ test.serial(
test.serial(
'erase screen where exists but interactive part is taller than viewport',
async t => {
- const ps = term('erase', ['3']);
+ const ps = term('erase', [], {rows: 3});
await ps.waitForExit();
t.true(ps.output.includes(ansiEscapes.clearTerminal));