Fix bug with process.stdout.clearLine being missing. Use readline instead.
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2022-01-11 09:43:48 +00:00
parent 26217cd529
commit 819ca84429

View file

@ -1,3 +1,4 @@
import * as readline from 'readline'
import { printError } from './cli.mjs' import { printError } from './cli.mjs'
function Group(e, name) { function Group(e, name) {
@ -235,8 +236,8 @@ Eltro.prototype.__runTest = async function(stats, test, prefix = 'Test', child =
} }
if (this.reporter === 'list') { if (this.reporter === 'list') {
process.stdout.clearLine(); readline.clearLine(process.stdout, 0)
process.stdout.cursorTo(0); readline.cursorTo(process.stdout, 0, null)
if (markRealTest.skipTest) { if (markRealTest.skipTest) {
process.stdout.write(' \x1b[94m- ' + markRealTest.name + '\x1b[0m\n') process.stdout.write(' \x1b[94m- ' + markRealTest.name + '\x1b[0m\n')
} else if (!markRealTest.error) { } else if (!markRealTest.error) {