Skip to content

Commit 7f7aa4e

Browse files
committed
test: update snapshots
Signed-off-by: Sebastian Beltran <[email protected]>
1 parent d79947d commit 7f7aa4e

File tree

6 files changed

+32
-31
lines changed

6 files changed

+32
-31
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ class Server {
20992099
return;
21002100
}
21012101

2102-
res.setHeader("Content-Type", "application/javascript; charset=UTF-8");
2102+
res.setHeader("Content-Type", "text/javascript; charset=utf-8");
21032103
res.setHeader("Content-Length", stats.size);
21042104

21052105
if (req.method === "HEAD") {

test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,28 @@ exports[`Built in routes with simple config should handle HEAD request to direct
5656

5757
exports[`Built in routes with simple config should handle HEAD request to directory index: page errors 1`] = `[]`;
5858

59-
exports[`Built in routes with simple config should handle HEAD request to directory index: response headers content-type 1`] = `"text/html; charset=utf-8"`;
59+
exports[`Built in routes with simple config should handle HEAD request to directory index: response headers content-type 1`] = `application/javascript; charset=utf-8`;
6060

6161
exports[`Built in routes with simple config should handle HEAD request to directory index: response status 1`] = `200`;
6262

6363
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: console messages 1`] = `[]`;
6464

65-
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"`;
65+
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response headers content-type 1`] = `"text/javascript; charset=utf-8"`;
6666

6767
exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response status 1`] = `200`;
6868

6969
exports[`Built in routes with simple config should handles GET request to sockjs bundle: console messages 1`] = `[]`;
7070

7171
exports[`Built in routes with simple config should handles GET request to sockjs bundle: page errors 1`] = `[]`;
7272

73-
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`;
73+
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=utf-8"`;
7474

7575
exports[`Built in routes with simple config should handles GET request to sockjs bundle: response status 1`] = `200`;
7676

7777
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: console messages 1`] = `[]`;
7878

7979
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: page errors 1`] = `[]`;
8080

81-
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`;
81+
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=utf-8"`;
8282

8383
exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response status 1`] = `200`;

test/e2e/__snapshots__/history-api-fallback.test.js.snap.webpack5

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ exports[`historyApiFallback option as object with static and rewrites historyApi
3030

3131
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: page errors 1`] = `[]`;
3232

33-
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
33+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response headers content-type 1`] = `"text/html; charset=utf-8"`;
3434

3535
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect any other specified rewrites: response status 1`] = `200`;
3636

@@ -43,7 +43,7 @@ exports[`historyApiFallback option as object with static and rewrites historyApi
4343

4444
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: page errors 1`] = `[]`;
4545

46-
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
46+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response headers content-type 1`] = `"text/html; charset=utf-8"`;
4747

4848
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites and shows index for unknown urls: response status 1`] = `200`;
4949

@@ -56,7 +56,7 @@ exports[`historyApiFallback option as object with static and rewrites historyApi
5656

5757
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: page errors 1`] = `[]`;
5858

59-
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
59+
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response headers content-type 1`] = `"text/html; charset=utf-8"`;
6060

6161
exports[`historyApiFallback option as object with static and rewrites historyApiFallback respect rewrites for index: response status 1`] = `200`;
6262

@@ -82,7 +82,7 @@ exports[`historyApiFallback option as object with static should handle GET reque
8282

8383
exports[`historyApiFallback option as object with static should handle GET request to directory: page errors 1`] = `[]`;
8484

85-
exports[`historyApiFallback option as object with static should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=UTF-8"`;
85+
exports[`historyApiFallback option as object with static should handle GET request to directory: response headers content-type 1`] = `"text/html; charset=utf-8"`;
8686

8787
exports[`historyApiFallback option as object with static should handle GET request to directory: response status 1`] = `200`;
8888

@@ -95,7 +95,7 @@ exports[`historyApiFallback option as object with static should prefer static fi
9595

9696
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: page errors 1`] = `[]`;
9797

98-
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response headers content-type 1`] = `"text/plain; charset=UTF-8"`;
98+
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response headers content-type 1`] = `"text/plain; charset=utf-8"`;
9999

100100
exports[`historyApiFallback option as object with static should prefer static file over historyApiFallback: response status 1`] = `200`;
101101

test/e2e/__snapshots__/static-public-path.test.js.snap.webpack5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`static.publicPath option Content type should handle request to example.
44

55
exports[`static.publicPath option Content type should handle request to example.txt: page errors 1`] = `[]`;
66

7-
exports[`static.publicPath option Content type should handle request to example.txt: response header content-type 1`] = `"text/plain; charset=UTF-8"`;
7+
exports[`static.publicPath option Content type should handle request to example.txt: response header content-type 1`] = `"text/plain; charset=utf-8"`;
88

99
exports[`static.publicPath option Content type should handle request to example.txt: response status 1`] = `200`;
1010

test/e2e/allowed-hosts.test.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("allowed hosts", () => {
4343
target: `http://${devServerHost}:${devServerPort}`,
4444
ws: true,
4545
changeOrigin: true,
46-
logLevel: "warn",
46+
logger: "warn",
4747
}),
4848
);
4949

@@ -115,7 +115,7 @@ describe("allowed hosts", () => {
115115
target: `http://${devServerHost}:${devServerPort}`,
116116
ws: true,
117117
changeOrigin: true,
118-
logLevel: "warn",
118+
logger: "warn",
119119
}),
120120
);
121121

@@ -188,7 +188,7 @@ describe("allowed hosts", () => {
188188
target: `http://${devServerHost}:${devServerPort}`,
189189
ws: true,
190190
changeOrigin: true,
191-
logLevel: "warn",
191+
logger: "warn",
192192
}),
193193
);
194194

@@ -262,7 +262,7 @@ describe("allowed hosts", () => {
262262
target: `http://${devServerHost}:${devServerPort}`,
263263
ws: true,
264264
changeOrigin: true,
265-
logLevel: "warn",
265+
logger: "warn",
266266
}),
267267
);
268268

@@ -336,7 +336,7 @@ describe("allowed hosts", () => {
336336
target: `http://[${devServerHost}]:${devServerPort}`,
337337
ws: true,
338338
changeOrigin: true,
339-
logLevel: "warn",
339+
logger: "warn",
340340
}),
341341
);
342342

@@ -411,7 +411,7 @@ describe("allowed hosts", () => {
411411
target: `http://${IPv4}:${devServerPort}`,
412412
ws: true,
413413
changeOrigin: true,
414-
logLevel: "warn",
414+
logger: "warn",
415415
}),
416416
);
417417

@@ -488,7 +488,7 @@ describe("allowed hosts", () => {
488488
},
489489
ws: true,
490490
changeOrigin: true,
491-
logLevel: "warn",
491+
logger: "warn",
492492
}),
493493
);
494494

@@ -565,7 +565,7 @@ describe("allowed hosts", () => {
565565
},
566566
ws: true,
567567
changeOrigin: true,
568-
logLevel: "warn",
568+
logger: "warn",
569569
}),
570570
);
571571

@@ -643,7 +643,7 @@ describe("allowed hosts", () => {
643643
target: `http://${devServerHost}:${devServerPort}`,
644644
ws: true,
645645
changeOrigin: true,
646-
logLevel: "warn",
646+
logger: "warn",
647647
}),
648648
);
649649

@@ -721,7 +721,7 @@ describe("allowed hosts", () => {
721721
target: `http://${devServerHost}:${devServerPort}`,
722722
ws: true,
723723
changeOrigin: true,
724-
logLevel: "warn",
724+
logger: "warn",
725725
}),
726726
);
727727

@@ -799,7 +799,7 @@ describe("allowed hosts", () => {
799799
target: `http://${devServerHost}:${devServerPort}`,
800800
ws: true,
801801
changeOrigin: true,
802-
logLevel: "warn",
802+
logger: "warn",
803803
}),
804804
);
805805

@@ -877,7 +877,7 @@ describe("allowed hosts", () => {
877877
target: `http://${devServerHost}:${devServerPort}`,
878878
ws: true,
879879
changeOrigin: true,
880-
logLevel: "warn",
880+
logger: "warn",
881881
}),
882882
);
883883

@@ -958,7 +958,7 @@ describe("allowed hosts", () => {
958958
target: `http://${devServerHost}:${devServerPort}`,
959959
ws: true,
960960
changeOrigin: true,
961-
logLevel: "warn",
961+
logger: "warn",
962962
}),
963963
);
964964

@@ -1036,7 +1036,7 @@ describe("allowed hosts", () => {
10361036
target: `http://${devServerHost}:${devServerPort}`,
10371037
ws: true,
10381038
changeOrigin: true,
1039-
logLevel: "warn",
1039+
logger: "warn",
10401040
}),
10411041
);
10421042

@@ -1114,7 +1114,7 @@ describe("allowed hosts", () => {
11141114
target: `http://${devServerHost}:${devServerPort}`,
11151115
ws: true,
11161116
changeOrigin: true,
1117-
logLevel: "warn",
1117+
logger: "warn",
11181118
}),
11191119
);
11201120

@@ -1192,7 +1192,7 @@ describe("allowed hosts", () => {
11921192
target: `http://${devServerHost}:${devServerPort}`,
11931193
ws: true,
11941194
changeOrigin: true,
1195-
logLevel: "warn",
1195+
logger: "warn",
11961196
}),
11971197
);
11981198

@@ -1273,7 +1273,7 @@ describe("allowed hosts", () => {
12731273
secure: false,
12741274
ws: true,
12751275
changeOrigin: true,
1276-
logLevel: "warn",
1276+
logger: "warn",
12771277
}),
12781278
);
12791279

@@ -1351,7 +1351,7 @@ describe("allowed hosts", () => {
13511351
target: `http://${devServerHost}:${devServerPort}`,
13521352
ws: true,
13531353
changeOrigin: true,
1354-
logLevel: "warn",
1354+
logger: "warn",
13551355
}),
13561356
);
13571357

@@ -1430,7 +1430,7 @@ describe("allowed hosts", () => {
14301430
target: `http://${devServerHost}:${devServerPort}`,
14311431
ws: true,
14321432
changeOrigin: true,
1433-
logLevel: "warn",
1433+
logger: "warn",
14341434
}),
14351435
);
14361436

@@ -1511,7 +1511,7 @@ describe("allowed hosts", () => {
15111511
target: `http://${devServerHost}:${devServerPort}`,
15121512
ws: true,
15131513
changeOrigin: true,
1514-
logLevel: "warn",
1514+
logger: "warn",
15151515
}),
15161516
);
15171517

test/e2e/range-header.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("'Range' header", () => {
2626
const response = await request(server.app).get("/main.js");
2727

2828
expect(response.status).toBe(200);
29+
// TODO: why this content-type don't change?
2930
expect(response.headers["content-type"]).toBe(
3031
"application/javascript; charset=utf-8",
3132
);

0 commit comments

Comments
 (0)