Skip to content

Commit

Permalink
chore: add parallel test logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 29, 2023
1 parent 4c302ca commit 7de1f5f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions test/test-install.js
Expand Up @@ -75,21 +75,14 @@ describe('install', function () {

return it(name, async function () {
this.timeout(600000)
const start = Date.now()
await fn.call(this)
const expectedDir = path.join(prog.devDir, process.version.replace(/^v/, ''))
await rm(expectedDir, { recursive: true, force: true })
await Promise.all([
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, []),
install(prog, [])
])
await Promise.all(new Array(10).fill(0).map(async (_, i) => {
await install(prog,[])
console.log(`${' '.repeat(8)}${name} ${(i + 1).toString().padEnd(2, ' ')} (${Date.now() - start}ms)`)
}))
})
}

Expand Down

0 comments on commit 7de1f5f

Please sign in to comment.