diff --git a/packages/rules-unit-testing/src/impl/url.ts b/packages/rules-unit-testing/src/impl/url.ts index 5ab1c155c19..1152c4faa27 100644 --- a/packages/rules-unit-testing/src/impl/url.ts +++ b/packages/rules-unit-testing/src/impl/url.ts @@ -49,7 +49,5 @@ export function makeUrl(hostAndPort: HostAndPort | string, path: string): URL { hostAndPort = `${host}:${port}`; } } - const url = new URL(`http://${hostAndPort}/`); - url.pathname = path; - return url; + return new URL(`http://${hostAndPort}/${path}`); }