Skip to content

Commit

Permalink
Update for hapi v19
Browse files Browse the repository at this point in the history
  • Loading branch information
mattboutet committed Jan 11, 2020
1 parent ca6eb11 commit ca5b6a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -11,7 +11,7 @@ install:
- "npm install @hapi/hapi@$HAPI_VERSION"

env:
- HAPI_VERSION="18"
- HAPI_VERSION="19"

os:
- "linux"
Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Expand Up @@ -32,11 +32,10 @@ internals.fileMethod = function (path, responseOptions) {


exports.plugin = {
name: 'inert',
pkg: require('../package.json'),
once: true,
requirements: {
hapi: '>=17.7.0'
hapi: '>=18.4.0'
},

register(server, options) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@hapi/code": "8.x.x",
"@hapi/file": "2.x.x",
"@hapi/hapi": "18.x.x",
"@hapi/hapi": "19.x.x",
"@hapi/lab": "22.x.x"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/file.js
Expand Up @@ -341,7 +341,7 @@ describe('file', () => {
server.route({ method: 'GET', path: '/', handler: { file: Path.join(__dirname, 'file', 'FILE') } });

const res = await server.inject('/');
expect(res.statusCode).to.equal(200);
expect(res.statusCode).to.equal(204);
expect(res.headers['content-type']).to.equal('application/octet-stream');
});

Expand Down

0 comments on commit ca5b6a3

Please sign in to comment.