Skip to content

Commit 881b4b8

Browse files
committed
test: add more cases for ws
1 parent 9a08200 commit 881b4b8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/e2e/client.test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,14 @@ describe("client option", () => {
204204
webSocketServer: "sockjs",
205205
shouldThrow: false,
206206
},
207+
{
208+
title: 'as a string ("ws")',
209+
client: {
210+
webSocketTransport: "ws",
211+
},
212+
webSocketServer: "ws",
213+
shouldThrow: false,
214+
},
207215
{
208216
title: 'as a path ("sockjs")',
209217
client: {
@@ -214,6 +222,16 @@ describe("client option", () => {
214222
webSocketServer: "sockjs",
215223
shouldThrow: false,
216224
},
225+
{
226+
title: 'as a path ("ws")',
227+
client: {
228+
webSocketTransport: require.resolve(
229+
"../../client-src/clients/WebSocketClient"
230+
),
231+
},
232+
webSocketServer: "ws",
233+
shouldThrow: false,
234+
},
217235
{
218236
title: "as a nonexistent path",
219237
client: {
@@ -222,6 +240,14 @@ describe("client option", () => {
222240
webSocketServer: "sockjs",
223241
shouldThrow: true,
224242
},
243+
{
244+
title: "as a nonexistent path",
245+
client: {
246+
webSocketTransport: "/bad/path/to/implementation",
247+
},
248+
webSocketServer: "ws",
249+
shouldThrow: true,
250+
},
225251
];
226252

227253
describe("passed to server", () => {

0 commit comments

Comments
 (0)