-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests :)
c48afe6
to
c71f506
Compare
Thanks @daviddias I added a test running in the browser and receiving the error |
c71f506
to
072884d
Compare
try { | ||
res = await ipfs.dht.put(Buffer.from('a'), Buffer.from('b')) | ||
} catch (err) { | ||
expect(err).to.exist() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an error code or message we can assert on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No! But, I can add it to js-libp2p
. However, we will have to bump the rc
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure the error is because the DHT is disabled and not because of anything else. Whatever you can do to make that happen is good 👍
072884d
to
018a140
Compare
The
libp2p
defaults were not allowing the browser config to disable thedht
for browser nodes. This PR fixes that issue