Skip to content

Commit 52d458b

Browse files
committed
fix(ct): correctly open devtools
1 parent 54fac8f commit 52d458b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/runner/browser-env/vite/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,17 @@ export const getTestInfoFromViteRequest = (req: Connect.IncomingMessage): TestIn
4545
return null;
4646
}
4747

48+
if (req.originalUrl && req.originalUrl.endsWith("devtools.json")) {
49+
return null;
50+
}
51+
4852
const parsedUrl = url.parse(req.originalUrl);
4953
const [routeName, runUuid] = _.compact(parsedUrl.pathname?.split("/"));
5054

55+
if (runUuid?.endsWith(".map")) {
56+
return null;
57+
}
58+
5159
if (routeName !== VITE_RUN_UUID_ROUTE || !runUuid) {
5260
throw new Error(`Pathname must be in "/${VITE_RUN_UUID_ROUTE}/:uuid" format, but got: ${req.originalUrl}`);
5361
}

0 commit comments

Comments
 (0)