-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix:Uncaught SyntaxError: The URL 'http:/sockjs-node' is invalid #1749
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1749 +/- ##
=======================================
Coverage 86.85% 86.85%
=======================================
Files 9 9
Lines 578 578
Branches 170 170
=======================================
Hits 502 502
Misses 63 63
Partials 13 13 Continue to review full report at Codecov.
|
Oops, it looks like we were working on the same fix at the same time #1750. The issue with your fix is that it disregards the This does reveal that more tests are needed, since your changes passed CI. Maybe something more is needed here https://github.com/webpack/webpack-dev-server/blob/master/test/Socket.test.js or here https://github.com/webpack/webpack-dev-server/blob/master/test/Client.test.js to confirm that the client actually connects to the sockPath that the server provides. |
@Loonride Thank you, I understand now what was wrong.... |
That test works how it should, since it is confirming that the default behavior of the server is to use I added a test in my PR which confirms that the client connects to the right sockPath: https://github.com/webpack/webpack-dev-server/pull/1750/files#diff-b2d4a9632f66a16163b3edfdf960185e. The test runs a browser, then waits for the simulated client to make a request to the correct hostname and sockPath. It may be redundant at this point for you to fix your PR, but I recommend you look at the test above and make sure you understand why what you wrote would not pass that test. If you have any other questions, I would be happy to answer them! |
@Loonride I got the idea about what the test is testing that was really helpful for me, I'm going to learn more about tests to get a full understanding of exactly what's going on in the test. |
/cc @EslamHiko so we can close PR or you continue work in future? |
@evilebottnawi Yes sure no problem at all 😄 |
For Bugs and Features; did you add new tests?
Tests already exist
Motivation / Use-Case
to solve this issue : #1743
Breaking Changes
I just replaced
socketUrl
with '/sockjs-node' and removed unused code.Additional Info
I'm new to open source contributing if there is anything wrong about my pull request or any advice please tell me I'll really appreciate it.