Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wout opened this issue Apr 9, 2024 · 0 comments
Open

Comments

@wout
Copy link

wout commented Apr 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant