Skip to content

Commit 2880fa3

Browse files
authored
test: minor test flakiness (#611)
* chore: bring back coverage * revert: .gitignore * chore: try detecting open handles * revert: restore jest flags * chore: try this?
1 parent 70b7f4d commit 2880fa3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

__tests__/helpers/get-gha-setup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import * as getPkgVersion from '../../src/lib/getPkgVersion';
88

99
import getGitRemoteMock from './get-git-mock';
1010

11+
const testWorkingDir = process.cwd();
12+
1113
/**
1214
* A helper function for setting up tests for our GitHub Action onboarding.
1315
*
@@ -44,4 +46,5 @@ export function after() {
4446
configstore.clear();
4547
delete process.env.TEST_CREATEGHA;
4648
jest.clearAllMocks();
49+
process.chdir(testWorkingDir);
4750
}

0 commit comments

Comments
 (0)