@@ -6,6 +6,8 @@ const fastifyAccepts = require('..')
66
77const Fastify = require ( 'fastify' )
88
9+ /** @typedef {import('node:test').TestContext } TestContext */
10+
911const testCases = [
1012 {
1113 name : 'request - no header' ,
@@ -88,7 +90,7 @@ const testCases = [
8890 }
8991]
9092
91- test ( 'accept header' , async t => {
93+ test ( 'accept header' , async ( /** @type { TestContext } */ t ) => {
9294 t . plan ( testCases . length )
9395
9496 const fastify = Fastify ( )
@@ -120,7 +122,7 @@ test('accept header', async t => {
120122 const BASE_URL = `http://localhost:${ fastify . server . address ( ) . port } `
121123
122124 for ( const testCase of testCases ) {
123- await t . test ( testCase . name , async ( t ) => {
125+ await t . test ( testCase . name , async ( /** @type { TestContext } */ t ) => {
124126 t . plan ( 1 )
125127
126128 const result = await fetch ( `${ BASE_URL } ${ testCase . url } ` , {
@@ -133,7 +135,7 @@ test('accept header', async t => {
133135 }
134136} )
135137
136- test ( 'no reply decorator' , async function ( t ) {
138+ test ( 'no reply decorator' , async function ( /** @type { TestContext } */ t ) {
137139 const fastify = Fastify ( )
138140 fastify . register ( fastifyAccepts , { decorateReply : false } )
139141 await fastify . ready ( )
0 commit comments