File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
extensions/ql-vscode/test/vscode-tests/cli-integration/model-editor Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ describe("modeled-method-fs", () => {
5555 let cli : CodeQLCliServer ;
5656
5757 beforeEach ( async ( ) => {
58+ if ( ! process . env . TEST_CODEQL_PATH ) {
59+ fail (
60+ "TEST_CODEQL_PATH environment variable not set. It should point to the absolute path to a checkout of the codeql repository." ,
61+ ) ;
62+ }
63+
5864 // On windows, make sure to use a temp directory that isn't an alias and therefore won't be canonicalised by CodeQL.
5965 // The tmp package doesn't support this, so we have to do it manually.
6066 // See https://github.com/github/vscode-codeql/pull/2605 for more context.
@@ -73,11 +79,16 @@ describe("modeled-method-fs", () => {
7379 name : "workspace" ,
7480 index : 0 ,
7581 } ;
82+ const codeqlWorkspaceFolder = {
83+ uri : Uri . file ( process . env . TEST_CODEQL_PATH ) ,
84+ name : "ql" ,
85+ index : 1 ,
86+ } ;
7687 workspacePath = workspaceFolder . uri . fsPath ;
7788 mkdirSync ( workspacePath ) ;
7889 jest
7990 . spyOn ( workspace , "workspaceFolders" , "get" )
80- . mockReturnValue ( [ workspaceFolder ] ) ;
91+ . mockReturnValue ( [ workspaceFolder , codeqlWorkspaceFolder ] ) ;
8192
8293 const extension = await getActivatedExtension ( ) ;
8394 cli = extension . cliServer ;
You can’t perform that action at this time.
0 commit comments