Skip to content

Commit 117a990

Browse files
committed
test: add case
1 parent 3784da8 commit 117a990

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/e2e/ClientOptions.test.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,35 @@ for (const webSocketServerType of webSocketServerTypes) {
275275
});
276276
});
277277

278+
describe('should work with unspecified port and path', () => {
279+
beforeAll((done) => {
280+
const options = {
281+
webSocketServer: webSocketServerType,
282+
host: '0.0.0.0',
283+
};
284+
285+
testServer.startAwaitingCompilation(config, options, done);
286+
});
287+
288+
afterAll(testServer.close);
289+
290+
describe('browser client', () => {
291+
it('uses correct port and path', (done) => {
292+
runBrowser().then(({ page, browser }) => {
293+
waitForTest(browser, page, /ws/, (websocketUrl) => {
294+
expect(websocketUrl).toContain(
295+
`${websocketUrlProtocol}://localhost:${port1}/ws`
296+
);
297+
298+
done();
299+
});
300+
301+
page.goto(`http://localhost:${port1}/main`);
302+
});
303+
});
304+
});
305+
});
306+
278307
describe('should work with custom client port and without path', () => {
279308
beforeAll((done) => {
280309
const options = {

0 commit comments

Comments
 (0)