Skip to content

Non-standard port number of test server is not reflected in WebSocket URL #684

@wout

Description

@wout

If the test server is started and another service is already running on port 3001, Mint suggests using a different port (e.g., 3002):

Mint - Running Tests
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Ensuring dependencies... 74μs
⚙ Compiling tests... 81.061ms
⚙ Starting test server...
⚙ Starting browser...
⚙ Port 3001 is used by a different application!
⚙ Would you like to to use port 3002 instead? (Y/n)

(sidenote: the last line has two times the word to in it)

When choosing the new port number, the test server starts but then hangs. After looking at the source in the browser (at http://127.0.0.1:3002/), I noticed the WebSocket URL is still pointing to the default port (3001):

...
    <script src="/runtime.js"></script>
    <script>
      class TestRunner {
        constructor () {
          this.socket = new WebSocket("ws://127.0.0.1:3001/")
...

By killing the other service at 3001 and starting the mint test server at its default port, everything works as expected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions