Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: fix log.tail by calling add after listening for events
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Oct 30, 2018
1 parent 979d8b5 commit 7543c06
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/log.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ describe('.log', function () {
})

it('.log.tail', (done) => {
let i = setInterval(() => {
ipfs.files.add(Buffer.from('just adding some data to generate logs'))
}, 1000)

const req = ipfs.log.tail((err, res) => {
clearInterval(i)
expect(err).to.not.exist()
expect(req).to.exist()

Expand Down

0 comments on commit 7543c06

Please # to comment.