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