Skip to content
kerfjsGitHub

Diagnostics

T013

A real WebSocket or EventSource in a fast test.

Fix: Use the fake transport: net.push, net.poke, net.drop.

Status in kerf@0.1.0: reported by kerf check on test files.

Triggers it:

tsx
test('feed', () => { const socket = new WebSocket('ws://localhost/feed'); expect(socket).toBeTruthy() })

A test that needs it on purpose keeps it with a reason: // kerf-allow T013: <why> in the file header (whole file) or on the line above.

More: kerf docs testing.