fix: use hoppscotch's realtime echo servers - resolved #1913

This commit is contained in:
liyasthomas
2021-10-29 08:55:31 +05:30
parent 20bfc02a4e
commit 8f04f0758b
3 changed files with 12 additions and 10 deletions

View File

@@ -242,7 +242,7 @@ export default defineComponent({
return {
// default version is set to v4
clientVersion: "v4",
url: "wss://main-daxrc78qyb411dls-gtw.qovery.io",
url: "wss://hoppscotch-socketio.herokuapp.com",
path: "/socket.io",
isUrlValid: true,
connectingState: false,

View File

@@ -228,7 +228,7 @@ export default defineComponent({
return {
connectionState: false,
connectingState: false,
url: "wss://echo.websocket.org",
url: "wss://hoppscotch-websocket.herokuapp.com",
isUrlValid: true,
socket: null,
communication: {

View File

@@ -7,8 +7,8 @@ describe("wsValid", () => {
})
test("returns true for valid URL with Hostname", () => {
expect(wsValid("wss://echo.websocket.org/")).toBe(true)
expect(wsValid("wss://echo.websocket.org")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
})
test("returns false for invalid URL with IP address", () => {
@@ -29,8 +29,8 @@ describe("wsValid", () => {
})
test("returns true for wss protocol URLs", () => {
expect(wsValid("wss://echo.websocket.org/")).toBe(true)
expect(wsValid("wss://echo.websocket.org")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
expect(wsValid("wss://174.129.224.73/")).toBe(true)
expect(wsValid("wss://174.129.224.73")).toBe(true)
})
@@ -65,8 +65,8 @@ describe("httpValid", () => {
})
test("returns false for non-http(s) protocol URLs", () => {
expect(httpValid("wss://echo.websocket.org/")).toBe(false)
expect(httpValid("wss://echo.websocket.org")).toBe(false)
expect(httpValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(false)
expect(httpValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(false)
expect(httpValid("wss://174.129.224.73/")).toBe(false)
expect(httpValid("wss://174.129.224.73")).toBe(false)
})
@@ -129,8 +129,10 @@ describe("socketioValid", () => {
})
test("returns true for wss protocol URLs", () => {
expect(socketioValid("wss://echo.websocket.org/")).toBe(true)
expect(socketioValid("wss://echo.websocket.org")).toBe(true)
expect(socketioValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(
true
)
expect(socketioValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
expect(socketioValid("wss://174.129.224.73/")).toBe(true)
expect(socketioValid("wss://174.129.224.73")).toBe(true)
})