mirror of https://github.com/webpack/webpack.git
Fix compiler tests
This commit is contained in:
parent
44e02f46d6
commit
e225d1005c
|
|
@ -426,7 +426,6 @@ describe("Compiler", () => {
|
|||
compiler.outputFileSystem = new MemoryFs();
|
||||
const watching = compiler.watch({}, (err, stats) => {
|
||||
if (err) return done(err);
|
||||
done();
|
||||
});
|
||||
watching.close(() => {
|
||||
compiler.run((err, stats) => {
|
||||
|
|
@ -435,4 +434,25 @@ describe("Compiler", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
it("should watch again correctly after first closed watch", function(done) {
|
||||
const compiler = webpack({
|
||||
context: __dirname,
|
||||
mode: "production",
|
||||
entry: "./c",
|
||||
output: {
|
||||
path: "/",
|
||||
filename: "bundle.js"
|
||||
}
|
||||
});
|
||||
compiler.outputFileSystem = new MemoryFs();
|
||||
const watching = compiler.watch({}, (err, stats) => {
|
||||
if (err) return done(err);
|
||||
});
|
||||
watching.close(() => {
|
||||
compiler.watch({}, (err, stats) => {
|
||||
if (err) return done(err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue