Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 5930d14

Browse files
evilaliv3juliemr
authored andcommitted
chore(deps): update various npm dependencies to latest stable releases
1 parent 3c94d72 commit 5930d14

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

package.json

+14-13
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,26 @@
1212
],
1313
"author": "Julie Ralph <[email protected]>",
1414
"dependencies": {
15-
"request": "~2.57.0",
15+
"request": "~2.67.0",
1616
"selenium-webdriver": "2.48.2",
1717
"jasminewd2": "0.0.6",
18-
"jasmine": "2.3.2",
18+
"jasmine": "2.4.1",
1919
"saucelabs": "~1.0.1",
20-
"glob": "~3.2",
21-
"adm-zip": "0.4.4",
20+
"glob": "~6.0",
21+
"adm-zip": "0.4.7",
2222
"optimist": "~0.6.0",
23-
"q": "1.0.0",
24-
"source-map-support": "~0.3.2"
23+
"q": "1.4.1",
24+
"source-map-support": "~0.4.0"
2525
},
2626
"devDependencies": {
27-
"expect.js": "~0.2.0",
28-
"chai": "~3.3.0",
29-
"chai-as-promised": "~5.1.0",
30-
"jshint": "2.5.0",
31-
"mocha": "2.3.3",
32-
"express": "~3.3.4",
33-
"rimraf": "~2.2.6"
27+
"expect.js": "~0.3.1",
28+
"chai": "~3.4.1",
29+
"chai-as-promised": "~5.2.0",
30+
"jshint": "2.9.1",
31+
"mocha": "2.3.4",
32+
"express": "~4.13.3",
33+
"body-parser": "1.14.2",
34+
"rimraf": "~2.5.0"
3435
},
3536
"repository": {
3637
"type": "git",

testapp/scripts/web-server.js

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
var express = require('express');
4+
var bodyParser = require('body-parser')
45
var optimist = require('optimist');
56
var util = require('util');
67
var path = require('path');
@@ -21,6 +22,10 @@ var angularDir = path.join(testAppDir, 'ng1/lib/angular_v' + argv.ngversion);
2122

2223
var main = function() {
2324
var port = argv.port;
25+
testApp.use('/ng1/lib/angular', express.static(angularDir));
26+
testApp.use(express.static(testAppDir));
27+
testApp.use(bodyParser.json());
28+
testApp.use(testMiddleware);
2429
testApp.listen(port);
2530
util.puts(["Starting express web server in", testAppDir ,"on port", port].
2631
join(" "));
@@ -29,52 +34,45 @@ var main = function() {
2934
var storage = {};
3035
var testMiddleware = function(req, res, next) {
3136
if (/ng[1-2]\/fastcall/.test(req.path)) {
32-
res.send(200, 'done');
37+
res.status(200).send('done');
3338
} else if (/ng[1-2]\/slowcall/.test(req.path)) {
3439
setTimeout(function() {
35-
res.send(200, 'finally done');
40+
res.status(200).send('finally done');
3641
}, 5000);
3742
} else if (/ng[1-2]\/fastTemplateUrl/.test(req.path)) {
38-
res.send(200, 'fast template contents');
43+
res.status(200).send('fast template contents');
3944
} else if (/ng[1-2]\/slowTemplateUrl/.test(req.path)) {
4045
setTimeout(function() {
41-
res.send(200, 'slow template contents');
46+
res.status(200).send('slow template contents');
4247
}, 5000);
4348
} else if (/ng[1-2]\/chat/.test(req.path)) {
4449
if (req.method === 'GET') {
4550
var value;
4651
if (req.query.q) {
4752
value = storage[req.query.q];
48-
res.send(200, value);
53+
res.status(200).send(value);
4954
} else {
50-
res.send(400, 'must specify query');
55+
res.status(400).send('must specify query');
5156
}
5257
} else if (req.method === 'POST') {
5358
if (req.body.key == 'newChatMessage') {
5459
if (!storage['chatMessages']) {
5560
storage['chatMessages'] = [];
5661
}
5762
storage['chatMessages'].push(req.body.value);
58-
res.send(200);
63+
res.sendStatus(200);
5964
} else if (req.body.key == 'clearChatMessages') {
6065
storage['chatMessages'] = [];
61-
res.send(200);
66+
res.sendStatus(200);
6267
} else {
63-
res.send(400, 'Unknown command');
68+
res.status(400).send('Unknown command');
6469
}
6570
} else {
66-
res.send(400, 'only accepts GET/POST');
71+
res.status(400).send('only accepts GET/POST');
6772
}
6873
} else {
6974
return next();
7075
}
7176
};
7277

73-
testApp.configure(function() {
74-
testApp.use('/ng1/lib/angular', express.static(angularDir));
75-
testApp.use(express.static(testAppDir));
76-
testApp.use(express.json());
77-
testApp.use(testMiddleware);
78-
});
79-
8078
main();

0 commit comments

Comments
 (0)