Skip to content

Commit

Permalink
test(protect): isolate test outputs per test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahed Ahmed committed May 5, 2021
1 parent ffced05 commit 00834f4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/snyk-protect/test/acceptance/protect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ describe('@snyk/protect', () => {
};
};

beforeAll(() => {
beforeEach(async () => {
tempFolder = path.join(__dirname, '__outputs__', uuid.v4());
fs.mkdirSync(tempFolder, { recursive: true });
await fs.promises.mkdir(tempFolder, { recursive: true });
});

afterAll(() => {
fs.rmdirSync(tempFolder, { recursive: true });
});

afterEach(() => {
afterEach(async () => {
await fs.promises.rmdir(tempFolder, { recursive: true });
jest.restoreAllMocks();
});

Expand Down

0 comments on commit 00834f4

Please sign in to comment.