diff --git a/src/core/url.js b/src/core/url.js index a528f39f3..57bbca134 100644 --- a/src/core/url.js +++ b/src/core/url.js @@ -25,7 +25,7 @@ export function getExtension(url) { } export function isPrefixedBy(baseURL, url) { - const prefix = getPrefix(url) || '/' + const prefix = getPrefix(url) || "/" return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix) } diff --git a/src/tests/functional/root_test.js b/src/tests/functional/root_test.js index 88c320e71..66f5f55a8 100644 --- a/src/tests/functional/root_test.js +++ b/src/tests/functional/root_test.js @@ -2,7 +2,7 @@ import { test } from "@playwright/test" import { assert } from "chai" import { nextBody, pathname, visitAction } from "../helpers/page" -test("test visiting a location inside the root", async ({ page }) => { +test("visiting a location inside the root", async ({ page }) => { page.goto("/src/tests/fixtures/root/index.html") page.click("#link-page-inside") await nextBody(page) @@ -10,7 +10,7 @@ test("test visiting a location inside the root", async ({ page }) => { assert.notEqual(await visitAction(page), "load") }) -test("test visiting the root itself", async ({ page }) => { +test("visiting the root itself", async ({ page }) => { page.goto("/src/tests/fixtures/root/page.html") page.click("#link-root") await nextBody(page) @@ -18,7 +18,7 @@ test("test visiting the root itself", async ({ page }) => { assert.notEqual(await visitAction(page), "load") }) -test("test visiting a location outside the root", async ({ page }) => { +test("visiting a location outside the root", async ({ page }) => { page.goto("/src/tests/fixtures/root/index.html") page.click("#link-page-outside") await nextBody(page)