favor afterEach for mock-fs

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-12-20 15:09:41 +01:00
parent edfc373b9b
commit 2d33cd4dc0
10 changed files with 19 additions and 56 deletions
@@ -30,7 +30,7 @@ import { ConfigReader } from '@backstage/config';
import getPort from 'get-port';
describe('appPlugin', () => {
beforeAll(() => {
beforeEach(() => {
mockFs({
[resolvePath(process.cwd(), 'node_modules/app')]: {
'package.json': '{}',
@@ -42,7 +42,7 @@ describe('appPlugin', () => {
});
});
afterAll(() => {
afterEach(() => {
mockFs.restore();
});