@@ -112,10 +112,13 @@ suite('vscode-codeql Bridge Tests', () => {
112112
113113 for ( const dir of dirs . split ( ':' ) ) {
114114 if ( dir . length === 0 ) continue ;
115- const parent = path . dirname ( dir ) ;
115+ // The immediate parent (GitHub.vscode-codeql storage root) only exists
116+ // after first activation. Verify the grandparent (VS Code's globalStorage
117+ // root) which is always created by VS Code.
118+ const grandparent = path . dirname ( path . dirname ( dir ) ) ;
116119 assert . ok (
117- fs . existsSync ( parent ) ,
118- `Parent of CODEQL_QUERY_RUN_RESULTS_DIRS entry does not exist: ${ parent } ` ,
120+ fs . existsSync ( grandparent ) ,
121+ `Grandparent of CODEQL_QUERY_RUN_RESULTS_DIRS entry does not exist: ${ grandparent } (from ${ dir } ) ` ,
119122 ) ;
120123 }
121124 } ) ;
@@ -133,10 +136,13 @@ suite('vscode-codeql Bridge Tests', () => {
133136
134137 for ( const dir of dirs . split ( ':' ) ) {
135138 if ( dir . length === 0 ) continue ;
136- const parent = path . dirname ( dir ) ;
139+ // The immediate parent (GitHub.vscode-codeql storage root) only exists
140+ // after first activation. Verify the grandparent (VS Code's globalStorage
141+ // root) which is always created by VS Code.
142+ const grandparent = path . dirname ( path . dirname ( dir ) ) ;
137143 assert . ok (
138- fs . existsSync ( parent ) ,
139- `Parent of CODEQL_MRVA_RUN_RESULTS_DIRS entry does not exist: ${ parent } ` ,
144+ fs . existsSync ( grandparent ) ,
145+ `Grandparent of CODEQL_MRVA_RUN_RESULTS_DIRS entry does not exist: ${ grandparent } (from ${ dir } ) ` ,
140146 ) ;
141147 }
142148 } ) ;
0 commit comments