fix: some potential tests issue (#2982)

This commit is contained in:
Peng Xiao
2023-07-03 18:46:47 +08:00
committed by GitHub
parent 901fc87716
commit 7f0a74c694
14 changed files with 52 additions and 17 deletions

View File

@@ -4,6 +4,8 @@ import fs from 'fs-extra';
import { v4 } from 'uuid';
import { afterEach, describe, expect, test, vi } from 'vitest';
import { removeWithRetry } from '../../../../tests/utils';
const tmpDir = path.join(__dirname, 'tmp');
const appDataPath = path.join(tmpDir, 'app-data');
@@ -20,7 +22,7 @@ vi.doMock('../../main-rpc', () => ({
}));
afterEach(async () => {
await fs.remove(tmpDir);
await removeWithRetry(tmpDir);
});
describe('list workspaces', () => {