diff --git a/test/gitWorkflow.spec.js b/test/gitWorkflow.spec.js index 155780932..586ecf18a 100644 --- a/test/gitWorkflow.spec.js +++ b/test/gitWorkflow.spec.js @@ -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() @@ -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."` + ) + }) + }) })