Skip to content

Commit a22f69b

Browse files
committed
updating devDep, server tests for webpack@3s
1 parent a9e83b4 commit a22f69b

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
},
1515
"devDependencies": {
1616
"codecov.io": "^0.1.6",
17-
"eslint": "^3.4.0",
17+
"eslint": "^4.0.0",
1818
"express": "^4.14.0",
19-
"file-loader": "^0.9.0",
19+
"file-loader": "^0.11.2",
2020
"istanbul": "^0.4.5",
2121
"mocha": "^3.0.2",
22-
"mocha-sinon": "^1.1.6",
22+
"mocha-sinon": "^2.0.0",
2323
"should": "^11.1.0",
24-
"sinon": "^1.17.5",
25-
"supertest": "^2.0.0",
26-
"webpack": "^2.6.1"
24+
"sinon": "^2.3.5",
25+
"supertest": "^3.0.0",
26+
"webpack": "^3.0.0"
2727
},
2828
"license": "MIT",
2929
"engines": {

test/Server.test.js

+35-35
Original file line numberDiff line numberDiff line change
@@ -44,60 +44,60 @@ describe("Server", function() {
4444

4545
it("GET request to bundle file", function(done) {
4646
request(app).get("/public/bundle.js")
47-
.expect("Content-Type", "application/javascript; charset=UTF-8")
48-
.expect("Content-Length", "2985")
49-
.expect(200, /console\.log\("Hey\."\)/, done);
47+
.expect("Content-Type", "application/javascript; charset=UTF-8")
48+
.expect("Content-Length", "2823")
49+
.expect(200, /console\.log\("Hey\."\)/, done);
5050
});
5151

5252
it("POST request to bundle file", function(done) {
5353
request(app).post("/public/bundle.js")
54-
.expect(404, done);
54+
.expect(404, done);
5555
});
5656

5757
it("request to image", function(done) {
5858
request(app).get("/public/svg.svg")
59-
.expect("Content-Type", "image/svg+xml; charset=UTF-8")
60-
.expect("Content-Length", "4778")
61-
.expect(200, done);
59+
.expect("Content-Type", "image/svg+xml; charset=UTF-8")
60+
.expect("Content-Length", "4778")
61+
.expect(200, done);
6262
});
6363

6464
it("request to non existing file", function(done) {
6565
request(app).get("/public/nope")
66-
.expect("Content-Type", "text/html; charset=utf-8")
67-
.expect(404, done);
66+
.expect("Content-Type", "text/html; charset=utf-8")
67+
.expect(404, done);
6868
});
6969

7070
it("request to HMR json", function(done) {
7171
request(app).get("/public/123a123412.hot-update.json")
72-
.expect("Content-Type", "application/json; charset=UTF-8")
73-
.expect(200, /\[\"hi\"\]/, done);
72+
.expect("Content-Type", "application/json; charset=UTF-8")
73+
.expect(200, /\[\"hi\"\]/, done);
7474
});
7575

7676
it("request to directory", function(done) {
7777
request(app).get("/public/")
78-
.expect("Content-Type", "text/html; charset=UTF-8")
79-
.expect("Content-Length", "10")
80-
.expect(200, /My\ Index\./, done);
78+
.expect("Content-Type", "text/html; charset=UTF-8")
79+
.expect("Content-Length", "10")
80+
.expect(200, /My\ Index\./, done);
8181
});
8282

8383
it("invalid range header", function(done) {
8484
request(app).get("/public/svg.svg")
85-
.set("Range", "bytes=6000-")
86-
.expect(416, done);
85+
.set("Range", "bytes=6000-")
86+
.expect(416, done);
8787
});
8888

8989
it("valid range header", function(done) {
9090
request(app).get("/public/svg.svg")
91-
.set("Range", "bytes=3000-3500")
92-
.expect("Content-Length", "501")
93-
.expect("Content-Range", "bytes 3000-3500/4778")
94-
.expect(206, done);
91+
.set("Range", "bytes=3000-3500")
92+
.expect("Content-Length", "501")
93+
.expect("Content-Range", "bytes 3000-3500/4778")
94+
.expect(206, done);
9595
});
9696

9797
it("request to non-public path", function(done) {
9898
request(app).get("/nonpublic/")
99-
.expect("Content-Type", "text/html; charset=utf-8")
100-
.expect(404, done);
99+
.expect("Content-Type", "text/html; charset=utf-8")
100+
.expect(404, done);
101101
});
102102
});
103103

@@ -117,8 +117,8 @@ describe("Server", function() {
117117

118118
it("GET request to bundle file", function(done) {
119119
request(app).get("/bundle.js")
120-
.expect("Content-Length", "2985")
121-
.expect(200, /console\.log\("Hey\."\)/, done);
120+
.expect("Content-Length", "2823")
121+
.expect(200, /console\.log\("Hey\."\)/, done);
122122
});
123123
});
124124

@@ -137,9 +137,9 @@ describe("Server", function() {
137137

138138
it("request to bundle file", function(done) {
139139
request(app).get("/bundle.js")
140-
.expect("X-nonsense-1", "yes")
141-
.expect("X-nonsense-2", "no")
142-
.expect(200, done);
140+
.expect("X-nonsense-1", "yes")
141+
.expect("X-nonsense-2", "no")
142+
.expect(200, done);
143143
});
144144
});
145145

@@ -185,10 +185,10 @@ describe("Server", function() {
185185

186186
it("request to both bundle files", function(done) {
187187
request(app).get("/js1/foo.js")
188-
.expect(200, function() {
189-
request(app).get("/js2/bar.js")
190-
.expect(200, done);
191-
});
188+
.expect(200, function() {
189+
request(app).get("/js2/bar.js")
190+
.expect(200, done);
191+
});
192192
});
193193
});
194194

@@ -213,10 +213,10 @@ describe("Server", function() {
213213

214214
it("request to bundle file", function(done) {
215215
request(app).get("/foo/bar")
216-
.expect(200, function() {
217-
should.exist(locals.webpackStats);
218-
done();
219-
});
216+
.expect(200, function() {
217+
should.exist(locals.webpackStats);
218+
done();
219+
});
220220
});
221221
});
222222
});

0 commit comments

Comments
 (0)