File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
packages/kit/test/apps/options-2/test Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ import path from 'node:path' ;
12import process from 'node:process' ;
3+ import { fileURLToPath } from 'node:url' ;
24import { expect } from '@playwright/test' ;
35import { test } from '../../../utils.js' ;
46
@@ -56,7 +58,18 @@ test.describe('paths', () => {
5658} ) ;
5759
5860test . describe ( 'Service worker' , ( ) => {
59- if ( process . env . DEV ) return ;
61+ if ( process . env . DEV ) {
62+ test ( 'import proxy /basepath/service-worker.js' , async ( { request } ) => {
63+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
64+ const response = await request . get ( '/basepath/service-worker.js' ) ;
65+ const content = await response . text ( ) ;
66+ expect ( content ) . toEqual (
67+ `import '${ path . join ( '/basepath' , '/@fs' , __dirname , '../src/service-worker.js' ) } ';`
68+ ) ;
69+ } ) ;
70+
71+ return ;
72+ }
6073
6174 test ( 'build /basepath/service-worker.js' , async ( { baseURL, request } ) => {
6275 const response = await request . get ( '/basepath/service-worker.js' ) ;
You can’t perform that action at this time.
0 commit comments