added a test/WatchCases test for AutomaticPrefetchPlugin

This commit is contained in:
thatn3wguy 2017-03-12 11:13:00 -04:00
parent 6c6a79942d
commit 9d10f41486
14 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,5 @@
var a = require("./a");
var b = require("./b");
var c = require("./c");
module.exports = a + b + c + '.0';

View File

@ -0,0 +1 @@
module.exports = "This ";

View File

@ -0,0 +1 @@
module.exports = "is only ";

View File

@ -0,0 +1,3 @@
module.exports = "a test";

View File

@ -0,0 +1,9 @@
it("should watch for changes", function() {
require("./foo/" + WATCH_STEP).should.be.eql('This is only a test.' + WATCH_STEP);
if(WATCH_STEP > 0){
STATS_JSON.modules[0].prefetched.should.be.true();
STATS_JSON.modules[1].prefetched.should.be.true();
STATS_JSON.modules[2].prefetched.should.be.true();
}
});

View File

@ -0,0 +1 @@
module.exports = "This ";

View File

@ -0,0 +1 @@
module.exports = "is only ";

View File

@ -0,0 +1,3 @@
module.exports = "a test";

View File

@ -0,0 +1 @@
module.exports = "This ";

View File

@ -0,0 +1 @@
module.exports = "is only ";

View File

@ -0,0 +1,3 @@
module.exports = "a test";

View File

@ -0,0 +1 @@
module.exports = "This ";

View File

@ -0,0 +1 @@
module.exports = "is only ";

View File

@ -0,0 +1,3 @@
module.exports = "a test";