Skip to content

Commit 1c7c03b

Browse files
committed
🐛 add extra var
1 parent 8aaedb9 commit 1c7c03b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/e2e/lib/framework/createTest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class TestBuilder {
185185
},
186186
testFixture: this.testFixture,
187187
extension: this.extension,
188-
useServiceWorker: this.useServiceWorker !== undefined,
188+
useServiceWorker: this.useServiceWorker,
189189
}
190190

191191
if (this.alsoRunWithRumSlim) {
@@ -271,10 +271,11 @@ function createTestContext(
271271
{ basePath, useServiceWorker }: SetupOptions
272272
): TestContext {
273273
const url = servers.base.url
274+
const hostname = useServiceWorker ? url.replace(/http:\/\/[^:]+:/, 'http://localhost:') : url
274275

275276
return {
276277
// Service workers require HTTPS or localhost due to browser security restrictions
277-
baseUrl: (useServiceWorker ? url.replace(/http:\/\/[^:]+:/, 'http://localhost:') : url) + basePath,
278+
baseUrl: hostname + basePath,
278279
crossOriginUrl: servers.crossOrigin.url,
279280
intakeRegistry: new IntakeRegistry(),
280281
servers,

0 commit comments

Comments
 (0)