Skip to content

Commit

Permalink
fix: stop using fs.rmdirSync (#12292)
Browse files Browse the repository at this point in the history
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
MukulKolpe and rarkins committed Oct 28, 2021
1 parent bfbb42f commit 165bf21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/datasource/crate/index.spec.ts
Expand Up @@ -96,7 +96,7 @@ describe('datasource/crate/index', () => {
let adminConfig: RepoGlobalConfig;

beforeEach(async () => {
tmpDir = await dir();
tmpDir = await dir({ unsafeCleanup: true });

adminConfig = {
localDir: join(tmpDir.path, 'local'),
Expand All @@ -108,8 +108,8 @@ describe('datasource/crate/index', () => {
memCache.init();
});

afterEach(() => {
fs.rmdirSync(tmpDir.path, { recursive: true });
afterEach(async () => {
await tmpDir.cleanup();
tmpDir = null;
setGlobalConfig();
});
Expand Down

0 comments on commit 165bf21

Please sign in to comment.