From 8dc60fa7a71aa438d72a78fae8d153642d098de9 Mon Sep 17 00:00:00 2001 From: Yuan Gao Date: Tue, 7 Aug 2018 18:50:35 +0800 Subject: [PATCH] add test for maxPayload in @types/ws --- types/ws/ws-tests.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/ws/ws-tests.ts b/types/ws/ws-tests.ts index 51d37bea9c..1b30da48ed 100644 --- a/types/ws/ws-tests.ts +++ b/types/ws/ws-tests.ts @@ -92,3 +92,10 @@ import * as https from 'https'; } }); } + +{ + const ws = new WebSocket('ws://www.host.com/path', { + maxPayload: 10 * 1024 * 1024 + }); + ws.on('open', () => ws.send('something assume to be really long')); +}