From 8a7e973e4d68e57567287316a960743f7389e332 Mon Sep 17 00:00:00 2001 From: Leo Feyer <1192057+leofeyer@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:46:41 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bruno Prieto --- src/core/url.js | 2 +- src/tests/functional/root_test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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)