File tree 3 files changed +31
-0
lines changed
3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -678,6 +678,8 @@ async function hyperlink(
678
678
if ( followSourceMaps ) {
679
679
relation . to . check = true ;
680
680
}
681
+ } else if ( relation . type === 'JavaScriptFetch' ) {
682
+ follow = false ;
681
683
} else {
682
684
follow = true ;
683
685
}
Original file line number Diff line number Diff line change @@ -2983,4 +2983,30 @@ describe('hyperlink', function () {
2983
2983
todo : 0 ,
2984
2984
} ) ;
2985
2985
} ) ;
2986
+
2987
+ it ( 'should not follow JavaScriptFetch relations' , async function ( ) {
2988
+ const t = new TapRender ( ) ;
2989
+ sinon . spy ( t , 'push' ) ;
2990
+ await hyperlink (
2991
+ {
2992
+ recursive : false ,
2993
+ root : pathModule . resolve (
2994
+ __dirname ,
2995
+ '..' ,
2996
+ 'testdata' ,
2997
+ 'fetch'
2998
+ ) ,
2999
+ inputUrls : [ 'index.html' ] ,
3000
+ } ,
3001
+ t
3002
+ ) ;
3003
+
3004
+ expect ( t . close ( ) , 'to satisfy' , {
3005
+ count : 1 ,
3006
+ pass : 1 ,
3007
+ fail : 0 ,
3008
+ skip : 0 ,
3009
+ todo : 0 ,
3010
+ } ) ;
3011
+ } ) ;
2986
3012
} ) ;
Original file line number Diff line number Diff line change
1
+ < script >
2
+ fetch ( './foo.json' ) . then ( console . log ) ;
3
+ </ script >
You can’t perform that action at this time.
0 commit comments