mirror of
https://github.com/nodejs/node.git
synced 2025-05-23 02:08:52 +00:00

This commit updates the test runner to make the built in test reporters internal modules. PR-URL: https://github.com/nodejs/node/pull/46092 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
18 lines
355 B
JavaScript
18 lines
355 B
JavaScript
'use strict';
|
|
|
|
module.exports = async function* dot(source) {
|
|
let count = 0;
|
|
for await (const { type } of source) {
|
|
if (type === 'test:pass') {
|
|
yield '.';
|
|
}
|
|
if (type === 'test:fail') {
|
|
yield 'X';
|
|
}
|
|
if ((type === 'test:fail' || type === 'test:pass') && ++count % 20 === 0) {
|
|
yield '\n';
|
|
}
|
|
}
|
|
yield '\n';
|
|
};
|