Skip to content

Commit 7de1f5f

Browse files
committed
chore: add parallel test logging
1 parent 4c302ca commit 7de1f5f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

test/test-install.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,14 @@ describe('install', function () {
7575

7676
return it(name, async function () {
7777
this.timeout(600000)
78+
const start = Date.now()
7879
await fn.call(this)
7980
const expectedDir = path.join(prog.devDir, process.version.replace(/^v/, ''))
8081
await rm(expectedDir, { recursive: true, force: true })
81-
await Promise.all([
82-
install(prog, []),
83-
install(prog, []),
84-
install(prog, []),
85-
install(prog, []),
86-
install(prog, []),
87-
install(prog, []),
88-
install(prog, []),
89-
install(prog, []),
90-
install(prog, []),
91-
install(prog, [])
92-
])
82+
await Promise.all(new Array(10).fill(0).map(async (_, i) => {
83+
await install(prog,[])
84+
console.log(`${' '.repeat(8)}${name} ${(i + 1).toString().padEnd(2, ' ')} (${Date.now() - start}ms)`)
85+
}))
9386
})
9487
}
9588

0 commit comments

Comments
 (0)