Skip to content

Commit 0884dd6

Browse files
committed
--no-recursive
1 parent bec0f36 commit 0884dd6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

packages/cli/__tests__/deploy.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)