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