Skip to content

Commit 357779b

Browse files
committed
clean git repo state
1 parent 6dbdecb commit 357779b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

integrations/upgrade/upgrade-errors.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ test(
4343

4444
// Undo all changes to the current repo. This will bring the repo back to a
4545
// v3 state, but the `node_modules` will now have v4 installed.
46-
await exec('git reset --hard HEAD')
46+
await exec('git reset --hard')
47+
await exec('git clean -df')
4748

4849
// Re-running the upgrade should result in an error
4950
return expect(() => {
@@ -132,7 +133,8 @@ test(
132133

133134
// Undo all changes to the current repo. This will bring the repo back to a
134135
// v3 state, but the `node_modules` will now have v4 installed.
135-
await exec('git reset --hard HEAD')
136+
await exec('git reset --hard')
137+
await exec('git clean -df')
136138

137139
// Re-running the upgrade should result in an error
138140
return expect(() => {
@@ -220,7 +222,8 @@ test(
220222

221223
// Undo all changes to the current repo. This will bring the repo back to a
222224
// v3 state, but the `node_modules` will now have v4 installed.
223-
await exec('git reset --hard HEAD')
225+
await exec('git reset --hard')
226+
await exec('git clean -df')
224227

225228
// Re-running the upgrade should result in an error
226229
return expect(() => {

0 commit comments

Comments
 (0)