File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ test.describe('dev-default', () => {
2121 const f = useFixture ( { root : 'examples/basic' , mode : 'dev' } )
2222 defineTest ( f )
2323
24- test ( 'validate findSourceMapURL' , async ( ) => {
24+ test ( 'validate findSourceMapURL - reject ' , async ( ) => {
2525 const requestUrl = new URL ( f . url ( '__vite_rsc_findSourceMapURL' ) )
2626 requestUrl . searchParams . set (
2727 'filename' ,
@@ -31,6 +31,20 @@ test.describe('dev-default', () => {
3131 const response = await fetch ( requestUrl )
3232 expect ( response . status ) . toBe ( 404 )
3333 } )
34+
35+ test ( 'validate findSourceMapURL - pass' , async ( ) => {
36+ const requestUrl = new URL ( f . url ( '__vite_rsc_findSourceMapURL' ) )
37+ requestUrl . searchParams . set (
38+ 'filename' ,
39+ new URL ( '../examples/basic/package.json' , import . meta. url ) . href ,
40+ )
41+ requestUrl . searchParams . set ( 'environmentName' , 'Server' )
42+ const response = await fetch ( requestUrl )
43+ expect ( response . status ) . toBe ( 200 )
44+ expect ( await response . json ( ) ) . toMatchObject ( {
45+ version : 3 ,
46+ } )
47+ } )
3448} )
3549
3650test . describe ( 'dev-initial' , ( ) => {
You can’t perform that action at this time.
0 commit comments