Fix #70 - Better error for .createServer in browser (#73)

* Fix #70 - Better error for .createServer in browser

* Add test for throw

* Make test sync
This commit is contained in:
Maciej Krüger
2018-04-24 12:45:56 +02:00
committed by David Dias
parent 887dc13742
commit 9ffe03adf6
3 changed files with 10 additions and 1 deletions

View File

@ -75,3 +75,7 @@ describe('libp2p-websockets', () => {
})
})
})
it('.createServer throws in browser', () => {
expect(new WS().createListener).to.throw()
})