Skip to content

Commit 72db45e

Browse files
committed
Time it
1 parent b5c69df commit 72db45e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/e2e.test.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const __dirname = import.meta.dirname || new URL('.', import.meta.url).pathname;
77
const NODE_MAJOR_VERSION = parseInt(process.versions.node.split('.')[0], 10);
88

99
function runTest(...paths) {
10+
console.time('Test Run');
1011
const file = join(...paths);
1112
const args = NODE_MAJOR_VERSION === 22 ? ['--experimental-async-context-frame', file] : [file];
1213
const result = spawnSync('node', args);
@@ -23,12 +24,16 @@ function runTest(...paths) {
2324
}
2425
}
2526

26-
console.log('Test stdout:', stdoutLines);
27+
if (stdoutLines.length > 0) {
28+
console.log('stdout:', stdoutLines);
29+
}
2730
if (stderrLines.length > 0) {
28-
console.log('Test stderr:', stderrLines);
31+
console.log('stderr:', stderrLines);
2932
}
3033

31-
return { status: result.status, stdoutLines, trace: trace };
34+
console.timeEnd('Test Run');
35+
36+
return { status: result.status, stdoutLines, trace };
3237
}
3338

3439
describe('e2e Tests', { timeout: 60000 }, () => {

0 commit comments

Comments
 (0)