Skip to content

Commit

Permalink
fix(test): Switch back to use fs-extra removeSync api
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten N.O. Henriksen committed Nov 27, 2021
1 parent a0758a0 commit 1a253b9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions test/integration/create-react-app/index.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict';

const execa = require('execa');
const { mkdirp, writeFileSync, existsSync } = require('fs-extra');
const { mkdirp, writeFileSync, existsSync, removeSync } = require('fs-extra');
const { join } = require('path');
const { rmSync } = require('fs');

const cli = require.resolve('create-react-app/index.js');

Expand All @@ -19,15 +18,8 @@ const generatedFiles = [
'package-lock.json',
];

const removeGenPath = () => {
rmSync(genPath, {
recursive: true,
force: true,
});
};

beforeEach(removeGenPath);
afterAll(removeGenPath);
beforeEach(() => removeSync(genPath));
afterAll(() => removeSync(genPath));

const run = (args, options) => execa('node', [cli].concat(args), options);

Expand Down

0 comments on commit 1a253b9

Please sign in to comment.