Skip to content

Commit

Permalink
add mixed test case which also tests equal order sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Apr 17, 2018
1 parent 873d7d4 commit be79d6d
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/statsCases/prefetch-preload-mixed/a.js
@@ -0,0 +1,2 @@
import(/* webpackPrefetch: true, webpackChunkName: "a1" */ "./a1");
import(/* webpackPrefetch: true, webpackChunkName: "a2" */ "./a2");
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions test/statsCases/prefetch-preload-mixed/b.js
@@ -0,0 +1,3 @@
import(/* webpackPrefetch: true, webpackChunkName: "b1" */ "./b1");
import(/* webpackPreload: true, webpackChunkName: "b2" */ "./b2");
import(/* webpackPrefetch: true, webpackChunkName: "b3" */ "./b3");
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions test/statsCases/prefetch-preload-mixed/c.js
@@ -0,0 +1,2 @@
import(/* webpackPreload: true, webpackChunkName: "c1" */ "./c1");
import(/* webpackPreload: true, webpackChunkName: "c2" */ "./c2");
Empty file.
Empty file.
11 changes: 11 additions & 0 deletions test/statsCases/prefetch-preload-mixed/expected.txt
@@ -0,0 +1,11 @@
chunk {0} a.js (a) 136 bytes <{3}> >{10}< >{9}< (prefetch: {10} {9}) [rendered]
chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered]
chunk {2} c.js (c) 134 bytes <{3}> >{4}< >{5}< (preload: {4} {5}) [rendered]
chunk {3} main.js (main) 126 bytes >{0}< >{1}< >{2}< [entry] [rendered]
chunk {4} c1.js (c1) 0 bytes <{2}> [rendered]
chunk {5} c2.js (c2) 0 bytes <{2}> [rendered]
chunk {6} b1.js (b1) 0 bytes <{1}> [rendered]
chunk {7} b2.js (b2) 0 bytes <{1}> [rendered]
chunk {8} b3.js (b3) 0 bytes <{1}> [rendered]
chunk {9} a1.js (a1) 0 bytes <{0}> [rendered]
chunk {10} a2.js (a2) 0 bytes <{0}> [rendered]
3 changes: 3 additions & 0 deletions test/statsCases/prefetch-preload-mixed/index.js
@@ -0,0 +1,3 @@
import(/* webpackChunkName: "a" */"./a");
import(/* webpackChunkName: "b" */"./b");
import(/* webpackChunkName: "c" */"./c");
8 changes: 8 additions & 0 deletions test/statsCases/prefetch-preload-mixed/webpack.config.js
@@ -0,0 +1,8 @@
module.exports = {
mode: "production",
entry: "./index",
stats: {
all: false,
chunks: true
}
};

0 comments on commit be79d6d

Please sign in to comment.