Skip to content

Commit faab42b

Browse files
committed
test(project-bootstrap): normalise url in test to make it more reliable
1 parent 40c0478 commit faab42b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/project-bootstrap.browser-authenticated.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ test("Project bootstrap works", async ({ page, baseURL }) => {
1818
expect(baseURL).toBeDefined();
1919

2020
const url = new URL(baseURL as string);
21-
const basePath = url.pathname;
21+
// normalise the URL - sometimes we get a slash on the end, other times not
22+
const basePath = url.pathname.endsWith("/") ? url.pathname.slice(0, -1) : url.pathname;
2223

2324
url.pathname = basePath + "/api/as-api/organisation/default";
2425

0 commit comments

Comments
 (0)