@@ -27,6 +27,8 @@ describe('db config store', async () => {
2727 expect ( config . remote . repositoryLists ) . to . be . empty ;
2828 expect ( config . remote . owners ) . to . be . empty ;
2929 expect ( config . remote . repositories ) . to . be . empty ;
30+ expect ( config . local . lists ) . to . be . empty ;
31+ expect ( config . local . databases ) . to . be . empty ;
3032 } ) ;
3133
3234 it ( 'should load an existing config' , async ( ) => {
@@ -36,12 +38,35 @@ describe('db config store', async () => {
3638 const config = configStore . getConfig ( ) . value ;
3739 expect ( config . remote . repositoryLists ) . to . have . length ( 1 ) ;
3840 expect ( config . remote . repositoryLists [ 0 ] ) . to . deep . equal ( {
39- ' name' : 'repoList1' ,
40- ' repositories' : [ 'foo/bar' , 'foo/baz' ]
41+ name : 'repoList1' ,
42+ repositories : [ 'foo/bar' , 'foo/baz' ]
4143 } ) ;
4244 expect ( config . remote . owners ) . to . be . empty ;
4345 expect ( config . remote . repositories ) . to . have . length ( 3 ) ;
44- expect ( config . remote . repositories ) . to . deep . equal ( [ 'owner/repo1' , 'owner/repo2' , 'owner/repo3' ] ) ;
46+ expect ( config . remote . repositories ) . to . deep . equal ( [
47+ 'owner/repo1' ,
48+ 'owner/repo2' ,
49+ 'owner/repo3' ,
50+ ] ) ;
51+ expect ( config . local . lists ) . to . have . length ( 2 ) ;
52+ expect ( config . local . lists [ 0 ] ) . to . deep . equal ( {
53+ name : 'localList1' ,
54+ databases : [
55+ {
56+ name : 'foo/bar' ,
57+ dateAdded : 1668096745193 ,
58+ language : 'go' ,
59+ storagePath : '/path/to/database/' ,
60+ } ,
61+ ] ,
62+ } ) ;
63+ expect ( config . local . databases ) . to . have . length ( 1 ) ;
64+ expect ( config . local . databases [ 0 ] ) . to . deep . equal ( {
65+ name : 'example-db' ,
66+ dateAdded : 1668096927267 ,
67+ language : 'ruby' ,
68+ storagePath : '/path/to/database/' ,
69+ } ) ;
4570 } ) ;
4671
4772 it ( 'should not allow modification of the config' , async ( ) => {
0 commit comments