Skip to content

Commit

Permalink
unexpected ended
Browse files Browse the repository at this point in the history
  • Loading branch information
maidh91 committed Nov 1, 2024
1 parent 5349484 commit f186cbf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/dht-bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ pipe.on('data', () => {
pipe.write(JSON.stringify(Pear.config.dht.bootstrap))
} catch (err) {
console.error(err)
pipe.end()
Pear.exit()
}
})
2 changes: 1 addition & 1 deletion test/fixtures/require-assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pipe.on('data', () => {
pipe.write(fs.readFileSync(require.asset('./text-file.txt'), 'utf8'))
} catch (err) {
console.error(err)
pipe.end()
Pear.exit()
}
})
2 changes: 1 addition & 1 deletion test/fixtures/sub-dep-require-assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pipe.on('data', () => {
pipe.write(readAsset())
} catch (err) {
console.error(err)
pipe.end()
Pear.exit()
}
})
2 changes: 1 addition & 1 deletion test/fixtures/versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ pipe.on('data', () => {
pipe.write(JSON.stringify(versions))
}).catch((err) => {
console.error(err)
pipe.end()
Pear.exit()
})
})
4 changes: 4 additions & 0 deletions test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ class Helper extends IPC {
clearTimeout(timeoutId)
reject(new Error('unexpected closed'))
})
pipe.on('end', () => {
clearTimeout(timeoutId)
reject(new Error('unexpected ended'))
})
})
pipe.write('start')
return res
Expand Down

0 comments on commit f186cbf

Please sign in to comment.