File tree Expand file tree Collapse file tree
extensions/ql-vscode/test/unit-tests/databases Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,33 @@ describe("db manager", () => {
8888 ) . toEqual ( "owner2/repo2" ) ;
8989 } ) ;
9090
91+ it ( "should add new remote repos to a user defined list" , async ( ) => {
92+ const dbConfig : DbConfig = createDbConfig ( {
93+ remoteLists : [
94+ {
95+ name : "my-list-1" ,
96+ repositories : [ "owner1/repo1" ] ,
97+ } ,
98+ ] ,
99+ } ) ;
100+
101+ await saveDbConfig ( dbConfig ) ;
102+
103+ await dbManager . addNewRemoteReposToList ( [ "owner2/repo2" ] , "my-list-1" ) ;
104+
105+ const dbConfigFileContents = await readDbConfigDirectly ( ) ;
106+ expect (
107+ dbConfigFileContents . databases . variantAnalysis . repositoryLists . length ,
108+ ) . toBe ( 1 ) ;
109+
110+ expect (
111+ dbConfigFileContents . databases . variantAnalysis . repositoryLists [ 0 ] ,
112+ ) . toEqual ( {
113+ name : "my-list-1" ,
114+ repositories : [ "owner1/repo1" , "owner2/repo2" ] ,
115+ } ) ;
116+ } ) ;
117+
91118 it ( "should add a new remote repo to a user defined list" , async ( ) => {
92119 const dbConfig : DbConfig = createDbConfig ( {
93120 remoteLists : [
You can’t perform that action at this time.
0 commit comments