@@ -16,28 +16,37 @@ describe("isUrlRequest()", () => {
1616 [ [ "//google.com" ] , false , "should be negative for scheme-agnostic urls" ] ,
1717 [ [ "http://google.com" ] , false , "should be negative for http urls" ] ,
1818 [ [ "https://google.com" ] , false , "should be negative for https urls" ] ,
19- [ [ "chrome-extension://" ] , false , "should be negative for https urls" ] ,
20- [ [ "moz-extension://" ] , false , "should be negative for https urls" ] ,
21- [ [ "ms-browser-extension://" ] , false , "should be negative for https urls" ] ,
19+
20+ [ [ "chrome-extension://" ] , false , "should be negative for nonstandard urls" ] ,
21+ [ [ "moz-extension://" ] , false , "should be negative for nonstandard urls" ] ,
22+ [ [ "ms-browser-extension://" ] , false , "should be negative for nonstandard urls" ] ,
23+ [ [ "custom-extension://" ] , false , "should be negative for nonstandard urls" ] ,
24+
2225 [ [ "path/to/thing" ] , true , "should be positive for implicit relative urls" ] ,
2326 [ [ "./path/to/thing" ] , true , "should be positive for explicit relative urls" ] ,
2427 [ [ "~path/to/thing" ] , true , "should be positive for module urls (with ~)" ] ,
2528 [ [ "some/other/stuff/and/then~path/to/thing" ] , true , "should be positive for module urls with path prefix" ] ,
2629 [ [ "./some/other/stuff/and/then~path/to/thing" ] , true , "should be positive for module urls with relative path prefix" ] ,
30+
2731 // with root (normal path)
2832 [ [ "path/to/thing" , "root/dir" ] , true , "should be positive with root if implicit relative url" ] ,
2933 [ [ "./path/to/thing" , "root/dir" ] , true , "should be positive with root if explicit relative url" ] ,
3034 [ [ "/path/to/thing" , "root/dir" ] , true , "should be positive with root if root-relative url" ] ,
35+
3136 // with root (boolean)
3237 [ [ "/path/to/thing" , true ] , true , "should be positive for root-relative if root = `true`" ] ,
38+
3339 // with root (boolean) on Windows
3440 [ [ "C:\\path\\to\\thing" ] , true , "should be positive for Windows absolute paths with drive letter" ] ,
3541 [ [ "\\\\?\\UNC\\ComputerName\\path\\to\\thing" ] , true , "should be positive for Windows absolute UNC paths" ] ,
42+
3643 // with root (module)
3744 [ [ "/path/to/thing" , "~" ] , true , "should be positive for module url if root = ~" ] ,
45+
3846 // with root (module path)
3947 [ [ "/path/to/thing" , "~module" ] , true , "should be positive for module prefixes when root starts with ~" ] ,
4048 [ [ "/path/to/thing" , "~module/" ] , true , "should be positive for module prefixes (with trailing slash) when root starts with ~" ] ,
49+
4150 // error cases
4251 [ [ "/path/to/thing" , 1 ] , new ExpectedError ( / u n e x p e c t e d p a r a m e t e r s / i) , "should throw an error on invalid root" ] ,
4352
0 commit comments