Archived
1
0

fixup: use REVERSE_PROXY_BASE_PATH

This commit is contained in:
Joe Previte 2022-12-21 14:19:53 -07:00
parent b6928faf44
commit 19b7ba8735
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -1,5 +1,6 @@
import { describe, test, expect } from "./baseFixture"
import { clean } from "../utils/helpers"
import { REVERSE_PROXY_BASE_PATH } from "../utils/constants"
const routes = ["/", "/vscode", "/vscode/"]
@ -17,7 +18,7 @@ describe("VS Code Routes", ["--disable-workspace-trust"], {}, async () => {
const url = new URL(codeServerPage.page.url())
if (process.env.USE_PROXY === "1") {
// Behind proxy, path will be /<port/ide + route
const pathWithoutProxy = url.pathname.split("/ide")[1]
const pathWithoutProxy = url.pathname.split(`/${REVERSE_PROXY_BASE_PATH}`)[1]
expect(pathWithoutProxy).toBe(route)
} else {
expect(url.pathname).toBe(route)