Skip to content

Commit

Permalink
test: add test for gitStashPop throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj authored and okonet committed Jul 10, 2019
1 parent 242deb5 commit 443ee90
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/gitWorkflow.spec.js
Expand Up @@ -3,7 +3,7 @@
import path from 'path'
import tmp from 'tmp'
import execa from 'execa'
import { execGit } from '../src/gitWorkflow'
import { execGit, gitStashPop } from '../src/gitWorkflow'

tmp.setGracefulCleanup()

Expand Down Expand Up @@ -32,4 +32,12 @@ describe('gitWorkflow', () => {
})
})
})

describe('gitStashPop', () => {
it('should throw when workingTree is null', () => {
expect(gitStashPop()).rejects.toThrowErrorMatchingInlineSnapshot(
`"Trying to restore from stash but could not find working copy stash."`
)
})
})
})

0 comments on commit 443ee90

Please sign in to comment.