File tree Expand file tree Collapse file tree
extensions/ql-vscode/test/vscode-tests/minimal-workspace/local-queries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -729,7 +729,17 @@ describe("local databases", () => {
729729 expect ( setCurrentDatabaseItemSpy ) . toBeCalledTimes ( 1 ) ;
730730 } ) ;
731731
732- it ( "should add database source archive folder" , async ( ) => {
732+ it ( "should not add database source archive folder when `codeQL.databaseDownload.addDatabaseSourceToWorkspace` is `false`" , async ( ) => {
733+ jest . spyOn ( config , "addDatabaseSourceToWorkspace" ) . mockReturnValue ( false ) ;
734+
735+ await databaseManager . openDatabase ( mockDbItem . databaseUri ) ;
736+
737+ expect ( addDatabaseSourceArchiveFolderSpy ) . toBeCalledTimes ( 0 ) ;
738+ } ) ;
739+
740+ it ( "should add database source archive folder when `codeQL.databaseDownload.addDatabaseSourceToWorkspace` is `true`" , async ( ) => {
741+ jest . spyOn ( config , "addDatabaseSourceToWorkspace" ) . mockReturnValue ( true ) ;
742+
733743 await databaseManager . openDatabase ( mockDbItem . databaseUri ) ;
734744
735745 expect ( addDatabaseSourceArchiveFolderSpy ) . toBeCalledTimes ( 1 ) ;
You can’t perform that action at this time.
0 commit comments