refactor: update echo server URLs

This commit is contained in:
liyasthomas
2022-04-29 06:40:38 +05:30
parent 00acf06700
commit 07735994e1
4 changed files with 11 additions and 12 deletions

View File

@@ -54,6 +54,7 @@ textarea {
html {
scroll-behavior: smooth;
scrollbar-gutter: stable;
}
body {

View File

@@ -7,8 +7,8 @@ describe("wsValid", () => {
})
test("returns true for valid URL with Hostname", () => {
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
expect(wsValid("wss://echo-websocket.hoppscotch.io/")).toBe(true)
expect(wsValid("wss://echo-websocket.hoppscotch.io")).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://hoppscotch-websocket.herokuapp.com/")).toBe(true)
expect(wsValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
expect(wsValid("wss://echo-websocket.hoppscotch.io/")).toBe(true)
expect(wsValid("wss://echo-websocket.hoppscotch.io")).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://hoppscotch-websocket.herokuapp.com/")).toBe(false)
expect(httpValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(false)
expect(httpValid("wss://echo-websocket.hoppscotch.io/")).toBe(false)
expect(httpValid("wss://echo-websocket.hoppscotch.io")).toBe(false)
expect(httpValid("wss://174.129.224.73/")).toBe(false)
expect(httpValid("wss://174.129.224.73")).toBe(false)
})
@@ -129,10 +129,8 @@ describe("socketioValid", () => {
})
test("returns true for wss protocol URLs", () => {
expect(socketioValid("wss://hoppscotch-websocket.herokuapp.com/")).toBe(
true
)
expect(socketioValid("wss://hoppscotch-websocket.herokuapp.com")).toBe(true)
expect(socketioValid("wss://echo-websocket.hoppscotch.io/")).toBe(true)
expect(socketioValid("wss://echo-websocket.hoppscotch.io")).toBe(true)
expect(socketioValid("wss://174.129.224.73/")).toBe(true)
expect(socketioValid("wss://174.129.224.73")).toBe(true)
})

View File

@@ -25,7 +25,7 @@ type HoppSIOSession = {
}
const defaultSIORequest: HoppSIORequest = {
endpoint: "wss://hoppscotch-socketio.herokuapp.com",
endpoint: "wss://echo-socketio.hoppscotch.io",
path: "/socket.io",
version: "v4",
}

View File

@@ -24,7 +24,7 @@ export type HoppWSSession = {
}
const defaultWSRequest: HoppWSRequest = {
endpoint: "wss://hoppscotch-websocket.herokuapp.com",
endpoint: "wss://echo-websocket.hoppscotch.io",
protocols: [],
}