Skip to content

Commit 8915fb8

Browse files
authored
test: add e2e tests for built in routes (#3669)
1 parent 4d1cbe1 commit 8915fb8

6 files changed

+574
-183
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: console messages 1`] = `Array []`;
4+
5+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: directory list 1`] = `
6+
"<h1>Assets Report:</h1><div><h2>Compilation: unnamed[0]</h2><ul><li>
7+
<strong><a href=\\"/bundle1/foo.js\\" target=\\"_blank\\">foo.js</a></strong>
8+
</li><li>
9+
<strong><a href=\\"/bundle1/path/to/file.html\\" target=\\"_blank\\">path/to/file.html</a></strong>
10+
</li></ul></div><div><h2>Compilation: named</h2><ul><li>
11+
<strong><a href=\\"/bundle2/bar.js\\" target=\\"_blank\\">bar.js</a></strong>
12+
</li></ul></div><div><h2>Compilation: other</h2><ul><li>
13+
<strong><a href=\\"bar.js\\" target=\\"_blank\\">bar.js</a></strong>
14+
</li></ul></div>"
15+
`;
16+
17+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: page errors 1`] = `Array []`;
18+
19+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: response headers content-type 1`] = `"text/html"`;
20+
21+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: response status 1`] = `200`;
22+
23+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: console messages 1`] = `Array []`;
24+
25+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: directory list 1`] = `
26+
"<h1>Assets Report:</h1><div><h2>Compilation: unnamed</h2><ul><li>
27+
<strong><a href=\\"main.js\\" target=\\"_blank\\">main.js</a></strong>
28+
</li><li>
29+
<strong><a href=\\"test.html\\" target=\\"_blank\\">test.html</a></strong>
30+
</li></ul></div>"
31+
`;
32+
33+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: page errors 1`] = `Array []`;
34+
35+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: response headers content-type 1`] = `"text/html"`;
36+
37+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: response status 1`] = `200`;
38+
39+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: console messages 1`] = `Array []`;
40+
41+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: page errors 1`] = `Array []`;
42+
43+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: response status 1`] = `200`;
44+
45+
exports[`Built in routes with simple config should handle GET request to magic async chunk: console messages 1`] = `Array []`;
46+
47+
exports[`Built in routes with simple config should handle GET request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`;
48+
49+
exports[`Built in routes with simple config should handle GET request to magic async chunk: response status 1`] = `200`;
50+
51+
exports[`Built in routes with simple config should handle GET request to magic async html: console messages 1`] = `
52+
Array [
53+
"[HMR] Waiting for update signal from WDS...",
54+
"Hey.",
55+
"[webpack-dev-server] Hot Module Replacement enabled.",
56+
"[webpack-dev-server] Live Reloading enabled.",
57+
]
58+
`;
59+
60+
exports[`Built in routes with simple config should handle GET request to magic async html: response headers content-type 1`] = `"text/html; charset=utf-8"`;
61+
62+
exports[`Built in routes with simple config should handle GET request to magic async html: response status 1`] = `200`;
63+
64+
exports[`Built in routes with simple config should handle HEAD request to directory index: console messages 1`] = `Array []`;
65+
66+
exports[`Built in routes with simple config should handle HEAD request to directory index: directory list 1`] = `""`;
67+
68+
exports[`Built in routes with simple config should handle HEAD request to directory index: page errors 1`] = `Array []`;
69+
70+
exports[`Built in routes with simple config should handle HEAD request to directory index: response headers content-type 1`] = `"text/html"`;
71+
72+
exports[`Built in routes with simple config should handle HEAD request to directory index: response status 1`] = `200`;
73+
74+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: console messages 1`] = `Array []`;
75+
76+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`;
77+
78+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response status 1`] = `200`;
79+
80+
exports[`Built in routes with simple config should handle HEAD request to magic async html: console messages 1`] = `Array []`;
81+
82+
exports[`Built in routes with simple config should handle HEAD request to magic async html: response headers content-type 1`] = `"text/html; charset=utf-8"`;
83+
84+
exports[`Built in routes with simple config should handle HEAD request to magic async html: response status 1`] = `200`;
85+
86+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: console messages 1`] = `Array []`;
87+
88+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: page errors 1`] = `Array []`;
89+
90+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"application/javascript"`;
91+
92+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response status 1`] = `200`;
93+
94+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: console messages 1`] = `Array []`;
95+
96+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: page errors 1`] = `Array []`;
97+
98+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"application/javascript"`;
99+
100+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response status 1`] = `200`;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: console messages 1`] = `Array []`;
4+
5+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: directory list 1`] = `
6+
"<h1>Assets Report:</h1><div><h2>Compilation: unnamed[0]</h2><ul><li>
7+
<strong><a href=\\"/bundle1/foo.js\\" target=\\"_blank\\">foo.js</a></strong>
8+
</li><li>
9+
<strong><a href=\\"/bundle1/path/to/file.html\\" target=\\"_blank\\">path/to/file.html</a></strong>
10+
</li></ul></div><div><h2>Compilation: named</h2><ul><li>
11+
<strong><a href=\\"/bundle2/bar.js\\" target=\\"_blank\\">bar.js</a></strong>
12+
</li></ul></div><div><h2>Compilation: other</h2><ul><li>
13+
<strong><a href=\\"bar.js\\" target=\\"_blank\\">bar.js</a></strong>
14+
</li></ul></div>"
15+
`;
16+
17+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: page errors 1`] = `Array []`;
18+
19+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: response headers content-type 1`] = `"text/html"`;
20+
21+
exports[`Built in routes with multi config should handle GET request to directory index and list all middleware directories: response status 1`] = `200`;
22+
23+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: console messages 1`] = `Array []`;
24+
25+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: directory list 1`] = `
26+
"<h1>Assets Report:</h1><div><h2>Compilation: unnamed</h2><ul><li>
27+
<strong><a href=\\"main.js\\" target=\\"_blank\\">main.js</a></strong>
28+
</li><li>
29+
<strong><a href=\\"test.html\\" target=\\"_blank\\">test.html</a></strong>
30+
</li></ul></div>"
31+
`;
32+
33+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: page errors 1`] = `Array []`;
34+
35+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: response headers content-type 1`] = `"text/html"`;
36+
37+
exports[`Built in routes with simple config should handle GET request to directory index and list all middleware directories: response status 1`] = `200`;
38+
39+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: console messages 1`] = `Array []`;
40+
41+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: page errors 1`] = `Array []`;
42+
43+
exports[`Built in routes with simple config should handle GET request to invalidate endpoint: response status 1`] = `200`;
44+
45+
exports[`Built in routes with simple config should handle GET request to magic async chunk: console messages 1`] = `Array []`;
46+
47+
exports[`Built in routes with simple config should handle GET request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`;
48+
49+
exports[`Built in routes with simple config should handle GET request to magic async chunk: response status 1`] = `200`;
50+
51+
exports[`Built in routes with simple config should handle GET request to magic async html: console messages 1`] = `
52+
Array [
53+
"[HMR] Waiting for update signal from WDS...",
54+
"Hey.",
55+
"[webpack-dev-server] Hot Module Replacement enabled.",
56+
"[webpack-dev-server] Live Reloading enabled.",
57+
]
58+
`;
59+
60+
exports[`Built in routes with simple config should handle GET request to magic async html: response headers content-type 1`] = `"text/html; charset=utf-8"`;
61+
62+
exports[`Built in routes with simple config should handle GET request to magic async html: response status 1`] = `200`;
63+
64+
exports[`Built in routes with simple config should handle HEAD request to directory index: console messages 1`] = `Array []`;
65+
66+
exports[`Built in routes with simple config should handle HEAD request to directory index: directory list 1`] = `""`;
67+
68+
exports[`Built in routes with simple config should handle HEAD request to directory index: page errors 1`] = `Array []`;
69+
70+
exports[`Built in routes with simple config should handle HEAD request to directory index: response headers content-type 1`] = `"text/html"`;
71+
72+
exports[`Built in routes with simple config should handle HEAD request to directory index: response status 1`] = `200`;
73+
74+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: console messages 1`] = `Array []`;
75+
76+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`;
77+
78+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response status 1`] = `200`;
79+
80+
exports[`Built in routes with simple config should handle HEAD request to magic async html: console messages 1`] = `Array []`;
81+
82+
exports[`Built in routes with simple config should handle HEAD request to magic async html: response headers content-type 1`] = `"text/html; charset=utf-8"`;
83+
84+
exports[`Built in routes with simple config should handle HEAD request to magic async html: response status 1`] = `200`;
85+
86+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: console messages 1`] = `Array []`;
87+
88+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: page errors 1`] = `Array []`;
89+
90+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"application/javascript"`;
91+
92+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response status 1`] = `200`;
93+
94+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: console messages 1`] = `Array []`;
95+
96+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: page errors 1`] = `Array []`;
97+
98+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"application/javascript"`;
99+
100+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response status 1`] = `200`;

0 commit comments

Comments
 (0)