Skip to content

Commit

Permalink
Try to fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matteodepalo committed Jul 17, 2023
1 parent 178a873 commit 0e9bd1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions 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';

Expand Down Expand Up @@ -28,4 +29,5 @@ function Test() {
);
}

process.stdout.rows = Number(process.argv[2]);
render(<Test />);
2 changes: 2 additions & 0 deletions 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';

Expand All @@ -22,4 +23,5 @@ function Test() {
);
}

process.stdout.rows = Number(process.argv[2]);
render(<Test />);
6 changes: 2 additions & 4 deletions test/render.tsx
Expand Up @@ -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'));
Expand All @@ -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 <Static> 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'));
Expand Down

0 comments on commit 0e9bd1b

Please sign in to comment.