Skip to content

Commit

Permalink
test: verbose flag full coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
purplecabbage committed Jan 26, 2022
1 parent 2377375 commit 4bc2131
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/commands/app/deploy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,15 @@ describe('run', () => {
expect(mockLogForwarding.updateServerConfig).toBeCalledTimes(0)
})

test('log forwarding is not updated on server when local config is absent --verbose', async () => {
command.getAppExtConfigs.mockReturnValueOnce(createAppConfig(command.appConfig))
const config = new LogForwarding.LogForwardingConfig()
mockLogForwarding.getLocalConfigWithSecrets.mockReturnValue(config)
command.argv = ['--verbose']
await command.run()
expect(mockLogForwarding.updateServerConfig).toBeCalledTimes(0)
})

test('log forwarding is not updated on server when local config not changed', async () => {
command.getAppExtConfigs.mockReturnValueOnce(createAppConfig(command.appConfig))
mockLogForwarding.isLocalConfigChanged.mockReturnValue(false)
Expand Down

0 comments on commit 4bc2131

Please sign in to comment.