mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
test(cli-core): exercise progress controls on an interactive output
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
This commit is contained in:
1 file changed
+1
-1
@@ -5,7 +5,7 @@ test('zero-item work has a finite completed progress bar', () => {
|
||||
const f = new OutputFormatter({ color: false }); assert.equal(f.progressBar(0, 0, 4), '[####] 100.0%');
|
||||
});
|
||||
test('showPercentage false suppresses the percentage suffix', () => {
|
||||
const f = new OutputFormatter({ color: false }); const progress = f.createProgress({ total: 2, current: 1, width: 4, showPercentage: false, showETA: false });
|
||||
const f = new OutputFormatter({ color: false }); f.supportsInteractiveOutput = () => true; const progress = f.createProgress({ total: 2, current: 1, width: 4, showPercentage: false, showETA: false });
|
||||
const original = process.stdout.write; let captured = ''; process.stdout.write = function(value) { captured += value; return true; };
|
||||
try { progress.render(); } finally { process.stdout.write = original; } assert.equal(captured, '[##--]');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user