Skip to content

Commit

Permalink
Fix unit test on Linux.
Browse files Browse the repository at this point in the history
Shuttle test failed because `Shuttle` sets the logging sink and
`Watcher` was logging that a check sum failed (a file had been deleted.)
Not sure why `Watcher` was even attempting to read the file, but I fixed
the test by returning a slice of the gathered messages, instead of
turning the gathered messages.

See #1037.
  • Loading branch information
flatheadmill committed Sep 11, 2019
1 parent 4082f31 commit 61dc0c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prolific.shuttle/test/shuttle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('shuttle', () => {
collector.on('data', data => {
gathered.push(data)
if (data.body.method == this._method && ++count == this._count) {
resolve(gathered)
resolve(gathered.slice(0))
}
})
})
Expand Down Expand Up @@ -128,6 +128,7 @@ describe('shuttle', () => {
const gathered = await gatherer.promise
destructible.destroy()
await destructible.promise
console.log(require('util').inspect(gathered, { depth: null }))
assert.deepStrictEqual(gathered.map(entry => entry.body.method), [
'start', 'exit'
], 'synchronous')
Expand Down

0 comments on commit 61dc0c4

Please sign in to comment.