File tree 1 file changed +3
-17
lines changed
test/sanitize-field-names
1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 8
8
} = require ( './_shared' )
9
9
const agent = require ( '../..' ) . start ( createAgentConfig ( ) )
10
10
11
- // Skip out of testing hapi if the current version combo is unsupported.
12
- // (See similar logic in "test/instrumentation/modules/hapi/shared.js".)
13
- const semver = require ( 'semver' )
14
- const hapiVersion = require ( '@hapi/hapi/package.json' ) . version
15
- // - hapi 17+ requires Node.js 8.9.0 or higher
16
- if ( semver . lt ( process . version , '8.9.0' ) && semver . gte ( hapiVersion , '17.0.0' ) ) {
17
- process . exit ( )
18
- }
19
- // - hapi 19+ requires Node.js 12 or higher
20
- if ( semver . lt ( process . version , '12.0.0' ) && semver . gte ( hapiVersion , '19.0.0' ) ) {
21
- process . exit ( )
22
- }
23
- // - hapi does not work on early versions of Node.js 10 because of
24
- // https://github.com/nodejs/node/issues/20516
25
- // NOTE: Do not use semver.satisfies, as it does not match prereleases
26
- const parsedVer = semver . parse ( process . version )
27
- if ( parsedVer . major === 10 && parsedVer . minor >= 0 && parsedVer . minor < 8 ) {
11
+ var isHapiIncompat = require ( '../_is_hapi_incompat' )
12
+ if ( isHapiIncompat ( '@hapi/hapi' ) ) {
13
+ // Skip out of this test.
28
14
process . exit ( )
29
15
}
30
16
You can’t perform that action at this time.
0 commit comments