From 355b39ac9db2f91f21c4a137fe8c339769db6344 Mon Sep 17 00:00:00 2001 From: Lois Desplat Date: Sun, 31 Jan 2016 16:16:05 -0500 Subject: [PATCH] Upgrade devDependencies, test Hapi 12, lint update with tests/examples --- .travis.yml | 1 + examples/arcgisonline.js | 3 +++ examples/facebook.js | 3 +++ examples/google.js | 3 +++ examples/linkedin.js | 3 +++ examples/meetup.js | 3 +++ examples/nest.js | 3 +++ examples/twitter.js | 3 +++ package.json | 6 +++--- test/index.js | 1 + 10 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index edb0c9bc..34373a47 100755 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ node_js: env: - HAPI_VERSION="10" - HAPI_VERSION="11" + - HAPI_VERSION="12" install: - npm install diff --git a/examples/arcgisonline.js b/examples/arcgisonline.js index 75a24a1d..9d026eb4 100644 --- a/examples/arcgisonline.js +++ b/examples/arcgisonline.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ port: 8000 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('arcgisonline', 'bell', { provider: 'arcgisonline', password: 'password', @@ -39,6 +41,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/facebook.js b/examples/facebook.js index d9769bdb..c4855a5e 100755 --- a/examples/facebook.js +++ b/examples/facebook.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ host: 'localhost', port: 3456 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('facebook', 'bell', { provider: 'facebook', password: 'password', @@ -45,6 +47,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/google.js b/examples/google.js index e61d4081..16ac0125 100755 --- a/examples/google.js +++ b/examples/google.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ host: 'localhost', port: 4567 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('google', 'bell', { provider: 'google', password: 'password', @@ -48,6 +50,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/linkedin.js b/examples/linkedin.js index 32828596..5d69b9ad 100644 --- a/examples/linkedin.js +++ b/examples/linkedin.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ port: 8000 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('linkedin', 'bell', { provider: 'linkedin', password: 'password', @@ -38,6 +40,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/meetup.js b/examples/meetup.js index c3495e87..a7ddd8f2 100644 --- a/examples/meetup.js +++ b/examples/meetup.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ port: 8000 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('meetup', 'bell', { provider: 'meetup', password: 'cookie_encryption_password', @@ -38,6 +40,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/nest.js b/examples/nest.js index b17ad203..ae5c44b4 100644 --- a/examples/nest.js +++ b/examples/nest.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ port: 8000 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('nest', 'bell', { provider: 'nest', password: 'password', @@ -34,6 +36,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/examples/twitter.js b/examples/twitter.js index 33f0d822..6647ec1c 100755 --- a/examples/twitter.js +++ b/examples/twitter.js @@ -3,6 +3,7 @@ // Load modules const Hapi = require('hapi'); +const Hoek = require('hoek'); const Bell = require('../'); @@ -11,6 +12,7 @@ server.connection({ port: 8000 }); server.register(Bell, (err) => { + Hoek.assert(!err, err); server.auth.strategy('twitter', 'bell', { provider: 'twitter', password: 'password', @@ -36,6 +38,7 @@ server.register(Bell, (err) => { server.start((err) => { + Hoek.assert(!err, err); console.log('Server started at:', server.info.uri); }); }); diff --git a/package.json b/package.json index eeddef09..9e728159 100644 --- a/package.json +++ b/package.json @@ -43,9 +43,9 @@ "hapi": ">=10.x.x" }, "devDependencies": { - "hapi": "11.x.x", - "hawk": "3.x.x", - "lab": "7.x.x", + "hapi": "12.x.x", + "hawk": "4.x.x", + "lab": "8.x.x", "code": "2.x.x", "sinon": "1.x.x" }, diff --git a/test/index.js b/test/index.js index 41b1b90c..95d524e4 100755 --- a/test/index.js +++ b/test/index.js @@ -338,6 +338,7 @@ describe('Bell', () => { server.connection({ host: 'localhost', port: 80 }); server.register(Bell, (err) => { + expect(err).to.not.exist(); expect(server.plugins.bell.oauth.Client).to.be.function(); done(); });