node/test/fixtures/test-runner/output/dot_output_custom_columns.js
Raz Luvaton 7e0c12fd56
test_runner: display dot report as wide as the terminal width
PR-URL: https://github.com/nodejs/node/pull/48038
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-05-23 04:44:38 +00:00

18 lines
421 B
JavaScript

// Flags: --test-reporter=dot
'use strict';
process.stdout.columns = 30;
const test = require('node:test');
const { setTimeout } = require('timers/promises');
for (let i = 0; i < 100; i++) {
test(i + ' example', async () => {
if (i === 0) {
// So the reporter will run before all tests has started
await setTimeout(10);
}
// resize
if (i === 28)
process.stdout.columns = 41;
});
}