Skip to content

Commit

Permalink
test: update test for restoring changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj committed Nov 14, 2019
1 parent 762d4d1 commit d843d07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/runAll.unmocked.spec.js
Expand Up @@ -344,6 +344,16 @@ index f80f875..1c5643c 100644

// Remove lock file
await fs.remove(`${cwd}/.git/index.lock`)

// Luckily there is a stash
expect(await execGit(['stash', 'list'])).toMatchInlineSnapshot(
`"stash@{0}: On master: lint-staged automatic backup"`
)
await execGit(['reset', '--hard'])
await execGit(['stash', 'pop', '--index'])

expect(await execGit(['diff'])).toEqual(diff)
expect(await readFile('test.js')).toEqual(testJsFileUgly + appended)
})

afterEach(async () => {
Expand Down

0 comments on commit d843d07

Please sign in to comment.