@@ -491,25 +491,33 @@ describe('Trusted Folders', () => {
491491 } ) ;
492492 } ) ;
493493
494+ const itif = ( condition : boolean ) => ( condition ? it : it . skip ) ;
495+
494496 describe ( 'Symlinks Support' , ( ) => {
495497 const mockSettings : Settings = {
496498 security : { folderTrust : { enabled : true } } ,
497499 } ;
498500
499- it ( 'should trust a folder if the rule matches the realpath' , ( ) => {
500- // Create a real directory and a symlink
501- const realDir = path . join ( tempDir , 'real' ) ;
502- const symlinkDir = path . join ( tempDir , 'symlink' ) ;
503- fs . mkdirSync ( realDir ) ;
504- fs . symlinkSync ( realDir , symlinkDir ) ;
505-
506- // Rule uses realpath
507- const config = { [ realDir ] : TrustLevel . TRUST_FOLDER } ;
508- fs . writeFileSync ( trustedFoldersPath , JSON . stringify ( config ) , 'utf-8' ) ;
509-
510- // Check against symlink path
511- expect ( isWorkspaceTrusted ( mockSettings , symlinkDir ) . isTrusted ) . toBe ( true ) ;
512- } ) ;
501+ // TODO: issue 19387 - Enable symlink tests on Windows
502+ itif ( process . platform !== 'win32' ) (
503+ 'should trust a folder if the rule matches the realpath' ,
504+ ( ) => {
505+ // Create a real directory and a symlink
506+ const realDir = path . join ( tempDir , 'real' ) ;
507+ const symlinkDir = path . join ( tempDir , 'symlink' ) ;
508+ fs . mkdirSync ( realDir ) ;
509+ fs . symlinkSync ( realDir , symlinkDir ) ;
510+
511+ // Rule uses realpath
512+ const config = { [ realDir ] : TrustLevel . TRUST_FOLDER } ;
513+ fs . writeFileSync ( trustedFoldersPath , JSON . stringify ( config ) , 'utf-8' ) ;
514+
515+ // Check against symlink path
516+ expect ( isWorkspaceTrusted ( mockSettings , symlinkDir ) . isTrusted ) . toBe (
517+ true ,
518+ ) ;
519+ } ,
520+ ) ;
513521 } ) ;
514522
515523 describe ( 'Verification: Auth and Trust Interaction' , ( ) => {
0 commit comments