Skip to content

Commit

Permalink
add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Dec 21, 2016
1 parent 71cf49a commit 1aea400
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/statsCases/max-modules-default/a.js
@@ -0,0 +1 @@
require("./c" + __resourceQuery)
1 change: 1 addition & 0 deletions test/statsCases/max-modules-default/b.js
@@ -0,0 +1 @@
require("./a" + __resourceQuery);
1 change: 1 addition & 0 deletions test/statsCases/max-modules-default/c.js
@@ -0,0 +1 @@
require("./b" + __resourceQuery)
21 changes: 21 additions & 0 deletions test/statsCases/max-modules-default/expected.txt
@@ -0,0 +1,21 @@
Hash: e36ab7d25d7661d1d913
Time: Xms
Asset Size Chunks Chunk Names
main.js 5.76 kB 0 [emitted] main
chunk {0} main.js (main) 1.18 kB [entry] [rendered]
[0] (webpack)/test/statsCases/max-modules-default/a.js?1 33 bytes {0} [built]
[1] (webpack)/test/statsCases/max-modules-default/a.js?10 33 bytes {0} [built]
[2] (webpack)/test/statsCases/max-modules-default/a.js?2 33 bytes {0} [built]
[3] (webpack)/test/statsCases/max-modules-default/a.js?3 33 bytes {0} [built]
[4] (webpack)/test/statsCases/max-modules-default/a.js?4 33 bytes {0} [built]
[5] (webpack)/test/statsCases/max-modules-default/a.js?5 33 bytes {0} [built]
[6] (webpack)/test/statsCases/max-modules-default/a.js?6 33 bytes {0} [built]
[7] (webpack)/test/statsCases/max-modules-default/a.js?7 33 bytes {0} [built]
[8] (webpack)/test/statsCases/max-modules-default/a.js?8 33 bytes {0} [built]
[9] (webpack)/test/statsCases/max-modules-default/a.js?9 33 bytes {0} [built]
[20] (webpack)/test/statsCases/max-modules-default/c.js?1 33 bytes {0} [built]
[21] (webpack)/test/statsCases/max-modules-default/c.js?10 33 bytes {0} [built]
[22] (webpack)/test/statsCases/max-modules-default/c.js?2 33 bytes {0} [built]
[23] (webpack)/test/statsCases/max-modules-default/c.js?3 33 bytes {0} [built]
[30] (webpack)/test/statsCases/max-modules-default/index.js 181 bytes {0} [built]
+ 16 hidden modules
10 changes: 10 additions & 0 deletions test/statsCases/max-modules-default/index.js
@@ -0,0 +1,10 @@
require("./a?1");
require("./a?2");
require("./a?3");
require("./a?4");
require("./a?5");
require("./a?6");
require("./a?7");
require("./a?8");
require("./a?9");
require("./a?10");
5 changes: 5 additions & 0 deletions test/statsCases/max-modules-default/webpack.config.js
@@ -0,0 +1,5 @@
var webpack = require("../../../");
module.exports = {
entry: "./index",
performance: false
};
1 change: 1 addition & 0 deletions test/statsCases/max-modules/a.js
@@ -0,0 +1 @@
require("./c" + __resourceQuery)
1 change: 1 addition & 0 deletions test/statsCases/max-modules/b.js
@@ -0,0 +1 @@
require("./a" + __resourceQuery);
1 change: 1 addition & 0 deletions test/statsCases/max-modules/c.js
@@ -0,0 +1 @@
require("./b" + __resourceQuery)
26 changes: 26 additions & 0 deletions test/statsCases/max-modules/expected.txt
@@ -0,0 +1,26 @@
Hash: e36ab7d25d7661d1d913
Time: Xms
Asset Size Chunks Chunk Names
main.js 5.76 kB 0 [emitted] main
chunk {0} main.js (main) 1.18 kB [entry] [rendered]
[0] (webpack)/test/statsCases/max-modules/a.js?1 33 bytes {0} [built]
[1] (webpack)/test/statsCases/max-modules/a.js?10 33 bytes {0} [built]
[2] (webpack)/test/statsCases/max-modules/a.js?2 33 bytes {0} [built]
[3] (webpack)/test/statsCases/max-modules/a.js?3 33 bytes {0} [built]
[4] (webpack)/test/statsCases/max-modules/a.js?4 33 bytes {0} [built]
[5] (webpack)/test/statsCases/max-modules/a.js?5 33 bytes {0} [built]
[6] (webpack)/test/statsCases/max-modules/a.js?6 33 bytes {0} [built]
[7] (webpack)/test/statsCases/max-modules/a.js?7 33 bytes {0} [built]
[8] (webpack)/test/statsCases/max-modules/a.js?8 33 bytes {0} [built]
[9] (webpack)/test/statsCases/max-modules/a.js?9 33 bytes {0} [built]
[20] (webpack)/test/statsCases/max-modules/c.js?1 33 bytes {0} [built]
[21] (webpack)/test/statsCases/max-modules/c.js?10 33 bytes {0} [built]
[22] (webpack)/test/statsCases/max-modules/c.js?2 33 bytes {0} [built]
[23] (webpack)/test/statsCases/max-modules/c.js?3 33 bytes {0} [built]
[24] (webpack)/test/statsCases/max-modules/c.js?4 33 bytes {0} [built]
[25] (webpack)/test/statsCases/max-modules/c.js?5 33 bytes {0} [built]
[26] (webpack)/test/statsCases/max-modules/c.js?6 33 bytes {0} [built]
[27] (webpack)/test/statsCases/max-modules/c.js?7 33 bytes {0} [built]
[28] (webpack)/test/statsCases/max-modules/c.js?8 33 bytes {0} [built]
[30] (webpack)/test/statsCases/max-modules/index.js 181 bytes {0} [built]
+ 11 hidden modules
10 changes: 10 additions & 0 deletions test/statsCases/max-modules/index.js
@@ -0,0 +1,10 @@
require("./a?1");
require("./a?2");
require("./a?3");
require("./a?4");
require("./a?5");
require("./a?6");
require("./a?7");
require("./a?8");
require("./a?9");
require("./a?10");
8 changes: 8 additions & 0 deletions test/statsCases/max-modules/webpack.config.js
@@ -0,0 +1,8 @@
var webpack = require("../../../");
module.exports = {
entry: "./index",
performance: false,
stats: {
maxModules: 20
}
};

0 comments on commit 1aea400

Please sign in to comment.