From 10d7c896cc3100bb6b7c69d9d001dc3c427bce76 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Thu, 8 Feb 2018 16:16:54 +0800 Subject: [PATCH] add test case --- types/websocket/websocket-tests.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/websocket/websocket-tests.ts b/types/websocket/websocket-tests.ts index 3044f9bf7d..94f8a11e16 100644 --- a/types/websocket/websocket-tests.ts +++ b/types/websocket/websocket-tests.ts @@ -180,8 +180,18 @@ function clientTest2() { } +function testClientAbortApi() { + var ipArray = getLocalIpArray(); + var client = new websocket.client(); + client.connect(`ws://${ipArray[0]}:8888`, undefined, undefined, undefined, { + localAddress: ipArray[0] + }); + client.abort(); +} + { console.log(`websocket test start.`); serverTest2(); clientTest2(); + testClientAbortApi(); }