Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

BUG: only remove workspace if not shallow clone #200

Merged
merged 4 commits into from
Jun 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: update deploy update tests
  • Loading branch information
btkostner committed May 30, 2018
commit 1ee5e471ddc87ec23cec2dc831ffb8524545c80d
12 changes: 11 additions & 1 deletion packages/shipit-deploy/src/tasks/deploy/update.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,21 @@ describe('deploy:update task', () => {
})
})

it('should remove workspace', async () => {
it('should remove workspace when shallow cloning', async () => {
shipit.config.shallowClone = true
stubShipit(shipit)
rmfr.mockClear()
expect(rmfr).not.toHaveBeenCalled()
await start(shipit, 'deploy:update')
expect(rmfr).toHaveBeenCalledWith('/tmp/workspace')
})

it('should not remove workspace when not shallow cloning', async () => {
shipit.config.shallowClone = false
stubShipit(shipit)
rmfr.mockClear()
expect(rmfr).not.toHaveBeenCalled()
await start(shipit, 'deploy:update')
expect(rmfr).not.toHaveBeenCalledWith('/tmp/workspace')
})
})