Skip to content

Commit e93dae1

Browse files
committed
test: fix fastify TAV test failures (#3314)
The TAV tests were failing on fastify@3 with this error: FastifyError [FST_ERR_PLUGIN_VERSION_MISMATCH]: fastify-plugin: @fastify/formbody - expected '4.x' fastify version, '3.29.5' is installed The '@fastify/formbody' dep used in the sanitize-field-names/fastify.test.js test file needs to match the fastify major version. I am somewhat hesitant to add this change, because I think it might make the fastify TAV tests much longer to run. Each version tested will be doing an additional npm install step, which is slow.
1 parent dfdf4c3 commit e93dae1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.tav.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ restify-v10-v12:
468468
# - #1086 suggests [email protected] was a broken release, skip it.
469469
# - [email protected] is broken: https://github.com/fastify/fastify/issues/3998#issuecomment-1153662513
470470
# - [email protected] - 4.16.2 (inclusive) are broken releases
471+
# - Do not run "test/sanitize-field-names/fastify.test.js" for older fastify,
472+
# because the test file uses '@fastify/formbody', which only has versions
473+
# for fastify >=3.
471474
fastify-v1:
472475
name: fastify
473476
versions: '1.x'
@@ -476,7 +479,6 @@ fastify-v1:
476479
- node test/instrumentation/modules/fastify/fastify.test.js
477480
- node test/instrumentation/modules/fastify/async-await.test.js
478481
- node test/instrumentation/modules/fastify/set-framework.test.js
479-
- node test/sanitize-field-names/fastify.test.js
480482
fastify-v2:
481483
name: fastify
482484
versions: '>=2.0.0 <2.4.0 || >2.4.0 <3'
@@ -485,10 +487,10 @@ fastify-v2:
485487
- node test/instrumentation/modules/fastify/fastify.test.js
486488
- node test/instrumentation/modules/fastify/async-await.test.js
487489
- node test/instrumentation/modules/fastify/set-framework.test.js
488-
- node test/sanitize-field-names/fastify.test.js
489490
fastify-v3:
490491
name: fastify
491492
versions: '>=3.0.0 <4'
493+
peerDependencies: '@fastify/formbody@^6.0.1'
492494
node: '>=10'
493495
commands:
494496
- node test/instrumentation/modules/fastify/fastify.test.js
@@ -498,6 +500,7 @@ fastify-v3:
498500
fastify:
499501
name: fastify
500502
versions: '>=4 <4.0.1 || >4.0.1 <4.16.0 || >4.16.2'
503+
peerDependencies: '@fastify/formbody@^7'
501504
node: '>=14.6.0'
502505
commands:
503506
- node test/instrumentation/modules/fastify/fastify.test.js

0 commit comments

Comments
 (0)