File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
npm/vite-dev-server/client Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,9 @@ if (supportFile) {
3434
3535// Using relative path wouldn't allow to load tests outside Vite project root folder
3636// So we use the "@fs" bit to load the test file using its absolute path
37- let testFileAbsolutePathRoute
38-
3937// Normalize path to not include a leading slash (different on Win32 vs Unix)
40- if ( CypressInstance . config ( 'platform' ) === 'win32' ) {
41- testFileAbsolutePathRoute = `${ devServerPublicPathRoute } /@fs/${ CypressInstance . spec . absolute } `
42- } else {
43- testFileAbsolutePathRoute = `${ devServerPublicPathRoute } /@fs${ CypressInstance . spec . absolute } `
44- }
38+ const normalizedAbsolutePath = CypressInstance . spec . absolute . replace ( / ^ \/ / , '' )
39+ const testFileAbsolutePathRoute = `${ devServerPublicPathRoute } /@fs/${ normalizedAbsolutePath } `
4540
4641/* Spec file import logic */
4742// We need a slash before /src/my-spec.js, this does not happen by default.
You can’t perform that action at this time.
0 commit comments