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
+1 -1
View File
@@ -42,7 +42,7 @@ const moveAppMock = jest.spyOn(tasks, 'moveAppTask');
const buildAppMock = jest.spyOn(tasks, 'buildAppTask');
describe('command entrypoint', () => {
beforeAll(() => {
beforeEach(() => {
mockFs({
[`${__dirname}/package.json`]: '', // required by `findPaths(__dirname)`
'templates/': mockFs.load(path.resolve(__dirname, '../templates/')),