use async rimraf
This commit is contained in:
parent
2d21828633
commit
5bcafa64e2
|
@ -35,8 +35,8 @@ const onceDone = (compiler, action) => {
|
|||
});
|
||||
};
|
||||
|
||||
function cleanup() {
|
||||
rimraf.sync(tempFolderPath);
|
||||
function cleanup(callback) {
|
||||
rimraf(tempFolderPath, callback);
|
||||
}
|
||||
|
||||
function createFiles() {
|
||||
|
@ -67,13 +67,14 @@ describe("ChangesAndRemovals", () => {
|
|||
|
||||
jest.setTimeout(10000);
|
||||
|
||||
beforeEach(() => {
|
||||
cleanup();
|
||||
createFiles();
|
||||
});
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
beforeEach(done => {
|
||||
cleanup(err => {
|
||||
if (err) return done(err);
|
||||
createFiles();
|
||||
done();
|
||||
});
|
||||
});
|
||||
afterEach(cleanup);
|
||||
|
||||
it("should track modified files when they've been modified in watchRun", done => {
|
||||
const compiler = createSingleCompiler();
|
||||
|
|
Loading…
Reference in New Issue