test/specs/ready.ts   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 12
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 10
mnd 1
bc 1
fnc 0
dl 0
loc 12
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 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
}))