diff --git a/.travis.yml b/.travis.yml index 974256b..33b4f7d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ install: - "npm install @hapi/hapi@$HAPI_VERSION" env: - - HAPI_VERSION="18" + - HAPI_VERSION="19" os: - "linux" diff --git a/lib/index.js b/lib/index.js index 19e4158..2be4e4f 100755 --- a/lib/index.js +++ b/lib/index.js @@ -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) { diff --git a/package.json b/package.json index a7f520d..fa0b442 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/test/file.js b/test/file.js index 1489559..57c3460 100755 --- a/test/file.js +++ b/test/file.js @@ -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'); });