Skip to content

Commit

Permalink
test: .tech origins
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Apr 16, 2024
1 parent 0c55898 commit 8b7fad7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/env.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('env.js', function () {
* webui.ipfs deployed endpoints
*/
testOriginAndEnv('https://webui.ipfs.tech', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui.ipfs.tech.ipns.dweb.link/', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui-ipfs-tech.ipns.dweb.link/', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui.ipfs.tech', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://some-random-url', () => { throw new Error('no match on origin') }, 'webui.ipfs', 1)
testOriginAndEnv('https://some-random-url', () => ({ redirected: false, url: 'https://some-random-url/webui' }), 'webui.ipfs', 1)
Expand All @@ -40,8 +40,9 @@ describe('env.js', function () {
* local webui endpoints
*/
testOriginAndEnv('http://webui.ipfs.tech.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui.ipfs.tech.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui-ipfs-tech.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui.ipfs.tech.ipns.localhost:48080/', () => {}, 'local', 0) // brave
testOriginAndEnv('http://webui-ipfs-tech.ipns.localhost:48080/', () => {}, 'local', 0) // brave
testOriginAndEnv('http://localhost:3000/', () => { throw new Error('no match on origin') }, 'local', 1)
testOriginAndEnv('http://127.0.0.1:3000/', () => { throw new Error('no match on origin') }, 'local', 1)
testOriginAndEnv('https://some-random-url.localhost:3333', () => ({ redirected: false, url: 'https://some-random-url.localhost:3333/webui' }), 'local', 1)
Expand Down

0 comments on commit 8b7fad7

Please sign in to comment.