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

@@ -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)
})