Skip to content

Commit d98a66e

Browse files
greenkeeperio-botmaxbeatty
authored andcommitted
Update hapi to version 15.0.2 🚀 (jsperf#176)
* chore(package): update hapi to version 15.0.2 https://greenkeeper.io/ * chore(package): update hapi to version 15.0.2 https://greenkeeper.io/ * pull in jsperf#174 jsperf#175, shrinkwrap updated deps * fix tests (typos and ordering) * add explicit hound config
1 parent c8ccf97 commit d98a66e

File tree

5 files changed

+56
-48
lines changed

5 files changed

+56
-48
lines changed

.hound.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fail_on_violations: true
2+
3+
eslint:
4+
enabled: true
5+
config_file: .eslintrc
6+
ignore_file: .eslintignore

npm-shrinkwrap.json

+30-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
"confidence": "3.0.1",
3535
"debug": "2.2.0",
3636
"dotenv": "2.0.0",
37-
"glue": "3.4.0",
38-
"good": "7.0.1",
37+
"glue": "4.0.0",
38+
"good": "7.0.2",
3939
"good-console": "6.1.2",
4040
"handlebars": "4.0.5",
41-
"hapi": "14.2.0",
41+
"hapi": "15.0.2",
4242
"hapi-auth-cookie": "6.1.1",
4343
"hapi-qs": "1.1.1",
4444
"highlight.js": "9.6.0",

test/unit/server/web/comment/index.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,34 @@ const CommentPlugin = proxyquire('../../../../../server/web/comment', {
1212
'../../services/comments': commentsServiceMock
1313
});
1414

15+
const cookiePass = 'password-should-be-32-characters';
16+
17+
const YarPlugin = {
18+
register: require('yar'),
19+
options: { cookieOptions: { password: cookiePass } }
20+
};
21+
22+
const AuthPlugin = {
23+
register: require('hapi-auth-cookie'),
24+
options: {}
25+
};
26+
1527
const lab = exports.lab = Lab.script();
1628
let s;
1729
let server;
1830

1931
lab.beforeEach(function (done) {
2032
s = sinon.sandbox.create();
2133

22-
const cookiePass = 'password-should-be-32-characters';
23-
const YarPlugin = {
24-
register: require('yar'),
25-
options: { cookieOptions: { password: cookiePass } }
26-
};
27-
28-
const AuthPlugin = {
29-
register: require('hapi-auth-cookie'),
30-
options: {}
31-
};
32-
3334
server = new Hapi.Server();
3435
server.connection();
35-
server.register([YarPlugin, AuthPlugin], () => {
36+
server.register([ AuthPlugin ], () => {
3637
server.auth.strategy('session', 'cookie', {
3738
password: cookiePass
3839
});
39-
});
4040

41-
server.register([ CommentPlugin ], done);
41+
server.register([ YarPlugin, CommentPlugin ], done);
42+
});
4243
});
4344

4445
lab.afterEach((done) => {

test/unit/server/web/test/index.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ lab.experiment('create comment', () => {
585585
);
586586

587587
request.headers = {};
588-
request.info = {};
589588

590589
done();
591590
});
@@ -642,8 +641,8 @@ lab.experiment('create comment', () => {
642641
});
643642
});
644643

645-
lab.test('remoteAdress', done => {
646-
request.info.remoteAdress = '127.0.0.1';
644+
lab.test('remoteAddress', done => {
645+
request.remoteAddress = '127.0.0.1';
647646

648647
server.inject(request, response => {
649648
Code.expect(response.statusCode).to.equal(200);

0 commit comments

Comments
 (0)