Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

chore: add err code for unknown signal server on dial #335

Merged
merged 2 commits into from
Apr 23, 2021

Conversation

vasco-santos
Copy link
Member

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The test may be better in the form of

return expect(ws1.dial(maOffline)).to.eventually.be.rejected.and.have.property('code', 'ERR_UNKNOWN_SIGNAL_SERVER')

since then any future broken behaviour would fail on an assertion instead of needing to throw an error but it's a minor nit.

@vasco-santos vasco-santos merged commit 4c82721 into master Apr 23, 2021
@vasco-santos vasco-santos deleted the chore/add-errcode-for-unknown-signal-server branch April 23, 2021 09:47
return expect(ws1.dial(maOffline)).to.eventually.be.rejected.and.have.property('code', 'ERR_SIGNALLING_FAILED')
})

it('dial unknown signal server, check promise rejected', async function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this didn't cause linting to fail - there's no await in this async function..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nor in the 'dial offline / non-exist()ent node on IPv4, check promise rejected' test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting 🤔 That is true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants