| Total Complexity | 1 |
| Complexity/F | 0 |
| Lines of Code | 12 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { createNew, timeout } from '../utils' |
||
| 2 | import mockServer from '../mock/server' |
||
| 3 | import { test } from '../suite' |
||
| 4 | |||
| 5 | /** Ready method. */ |
||
| 6 | test('ready', timeout(4e3, async () => { |
||
| 7 | const {port} = await mockServer() |
||
| 8 | const ws = createNew({}, port) |
||
| 9 | |||
| 10 | await ws.ready() |
||
| 11 | if(!ws.socket) throw new Error() |
||
| 12 | })) |