Skip to content

Commit

Permalink
test against hapi 20
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheffner committed Aug 23, 2020
1 parent d727e62 commit 76053f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
hapi-version:
- 18
- 19
- 20
exclude:
- node-version: 8.x
hapi-version: 19
- node-version: 10.x
hapi-version: 19
env:
HAPI_VERSION: ${{ matrix.hapi-version }}
CI: true
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -30,5 +32,3 @@ jobs:
npm install
npm run lint
npm test
env:
CI: true
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"test": "nyc ava",
"test:hapi19": "cross-env HAPI_VERSION=19 nyc ava",
"test:hapi20": "cross-env HAPI_VERSION=20 nyc ava",
"lint": "eslint test index.js test/**/*.js examples/**/*.js",
"format": "npm run lint -- --fix",
"coverage": "nyc report --reporter=text-lcov | coveralls"
Expand Down Expand Up @@ -44,6 +45,7 @@
"eslint-plugin-react": "^7.14.3",
"hapi18": "npm:@hapi/hapi@^18.3.1",
"hapi19": "npm:@hapi/hapi@^19.0.5",
"hapi20": "npm:@hapi/hapi@^20.0.0",
"nyc": "^15.0.0"
},
"ava": {
Expand All @@ -56,9 +58,9 @@
"p-any": "^3.0.0"
},
"peerDependencies": {
"@hapi/hapi": "18.x || 19.x"
"@hapi/hapi": "18.x || 19.x || 20.x"
},
"engines": {
"node" : ">=8.0.0"
"node": ">=8.0.0"
}
}
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/no-dynamic-require
const hapi = require(process.env.HAPI_VERSION === '19' ? 'hapi19' : 'hapi18');
const hapi = require(`hapi${process.env.HAPI_VERSION || '19'}`);
const boom = require('@hapi/boom');
const anyAuth = require('../');

Expand Down

0 comments on commit 76053f4

Please sign in to comment.