Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test_runner: add test and fix error
  • Loading branch information
rluvaton committed May 19, 2023
commit b47e380287e0179c57dfb4f5641b3b360ae7ba12
1 change: 1 addition & 0 deletions lib/internal/test_runner/reporter/dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = async function* dot(source) {

// Getting again in case the terminal was resized.
columns = getLineLength();
count = 0;
}
}
yield '\n';
Expand Down
13 changes: 11 additions & 2 deletions test/fixtures/test-runner/output/dot_output_custom_columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ process.stdout.columns = 30;

require('../../../common');
Comment thread
rluvaton marked this conversation as resolved.
Outdated
const test = require('node:test');
const {setTimeout} = require('timers/promises');
Comment thread
rluvaton marked this conversation as resolved.
Outdated

for (let i = 0; i < 100; i++) {
test(i + ' example', () => {});
}
test(i + ' example', async () => {
if(i === 0) {
Comment thread
rluvaton marked this conversation as resolved.
Outdated
// So the reporter will run before all tests has started
await setTimeout(10);
}
// resize
if (i === 28)
process.stdout.columns = 41;
});
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
..............................
..............................
..............................
..........
.........................................
.............................