File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,4 +99,22 @@ describe('CLI Deploy Command', () => {
9999 expect ( await testDb . exists ( 'table' , 'myfirstapp.users' ) ) . toBe ( false ) ;
100100 expect ( await testDb . exists ( 'table' , 'myfirstapp.products' ) ) . toBe ( false ) ;
101101 } ) ;
102+
103+
104+ it ( 'should deploy with --no-recursive flag' , async ( ) => {
105+ const commands = `lql deploy --database ${ testDb . name } --package my-first --no-recursive --yes` ;
106+
107+ await fixture . runTerminalCommands ( commands , {
108+ database : testDb . name
109+ } , true ) ;
110+
111+ expect ( await testDb . exists ( 'schema' , 'myfirstapp' ) ) . toBe ( true ) ;
112+ expect ( await testDb . exists ( 'table' , 'myfirstapp.users' ) ) . toBe ( true ) ;
113+ expect ( await testDb . exists ( 'table' , 'myfirstapp.products' ) ) . toBe ( true ) ;
114+
115+ const deployedChanges = await testDb . getDeployedChanges ( ) ;
116+ expect ( deployedChanges . some ( ( change : any ) => change . package === 'my-first' ) ) . toBe ( true ) ;
117+ expect ( deployedChanges . find ( ( change : any ) => change . package === 'my-second' ) ) . toBeFalsy ( ) ;
118+ expect ( deployedChanges . find ( ( change : any ) => change . package === 'my-third' ) ) . toBeFalsy ( ) ;
119+ } ) ;
102120} ) ;
You can’t perform that action at this time.
0 commit comments