Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: flakey windows test #1985

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
8 changes: 4 additions & 4 deletions test/cli/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ describe('daemon', () => {
await ipfs('config', 'Addresses.API', JSON.stringify(apiAddrs), '--json')
await ipfs('config', 'Addresses.Gateway', JSON.stringify(gatewayAddrs), '--json')

const out = await new Promise(resolve => {
const out = await new Promise((resolve, reject) => {
const res = ipfs('daemon')
let out = ''

res.stdout.on('data', function onData (data) {
out += data
if (out.includes('Daemon is ready')) {
res.stdout.removeListener('data', onData)
res.then(() => resolve(out)).catch(reject)
res.kill()
resolve(out)
}
})
})
Expand All @@ -134,16 +134,16 @@ describe('daemon', () => {
await ipfs('config', 'Addresses.API', '[]', '--json')
await ipfs('config', 'Addresses.Gateway', '[]', '--json')

const out = await new Promise(resolve => {
const out = await new Promise((resolve, reject) => {
const res = ipfs('daemon')
let out = ''

res.stdout.on('data', function onData (data) {
out += data
if (out.includes('Daemon is ready')) {
res.stdout.removeListener('data', onData)
res.then(() => resolve(out)).catch(reject)
res.kill()
resolve(out)
}
})
})
Expand Down