@@ -10,7 +10,7 @@ test('decorators get added', async (t) => {
1010 const fastify = Fastify ( )
1111 await fastify . register ( plugin )
1212
13- fastify . get ( '/' , ( req , reply ) => {
13+ fastify . get ( '/' , ( _req , reply ) => {
1414 t . assert . ok ( reply . etag )
1515 reply . send ( )
1616 } )
@@ -31,7 +31,7 @@ test('decorators add headers', async (t) => {
3131 const fastify = Fastify ( )
3232 await fastify . register ( plugin )
3333
34- fastify . get ( '/' , ( req , reply ) => {
34+ fastify . get ( '/' , ( _req , reply ) => {
3535 reply . etag ( tag ) . send ( )
3636 } )
3737
@@ -51,7 +51,7 @@ test('sets etag header for falsy argument', async (t) => {
5151 const fastify = Fastify ( )
5252 await fastify . register ( plugin )
5353
54- fastify . get ( '/' , ( req , reply ) => {
54+ fastify . get ( '/' , ( _req , reply ) => {
5555 reply . etag ( ) . send ( )
5656 } )
5757
@@ -70,7 +70,7 @@ test('sets no-cache header', async (t) => {
7070 const fastify = Fastify ( )
7171 await fastify . register ( plugin , { privacy : plugin . privacy . NOCACHE } )
7272
73- fastify . get ( '/' , ( req , reply ) => {
73+ fastify . get ( '/' , ( _req , reply ) => {
7474 reply . send ( { hello : 'world' } )
7575 } )
7676
@@ -95,7 +95,7 @@ test('sets private with max-age header', async (t) => {
9595 const fastify = Fastify ( )
9696 await fastify . register ( plugin , opts )
9797
98- fastify . get ( '/' , ( req , reply ) => {
98+ fastify . get ( '/' , ( _req , reply ) => {
9999 reply . send ( { hello : 'world' } )
100100 } )
101101
@@ -124,7 +124,7 @@ test('sets public with max-age and s-maxage header', async (t) => {
124124 const fastify = Fastify ( )
125125 await fastify . register ( plugin , opts )
126126
127- fastify . get ( '/' , ( req , reply ) => {
127+ fastify . get ( '/' , ( _req , reply ) => {
128128 reply . send ( { hello : 'world' } )
129129 } )
130130
@@ -151,12 +151,12 @@ test('do not set headers if another upstream plugin already sets it', async (t)
151151 }
152152
153153 const fastify = Fastify ( )
154- fastify . addHook ( 'onRequest' , async function checkCachingDoesNotOverrideCacheControlHeader ( req , reply ) {
154+ fastify . addHook ( 'onRequest' , async function checkCachingDoesNotOverrideCacheControlHeader ( _req , reply ) {
155155 reply . header ( 'cache-control' , 'do not override' )
156156 } )
157157 await fastify . register ( plugin , opts )
158158
159- fastify . get ( '/' , ( req , reply ) => {
159+ fastify . get ( '/' , ( _req , reply ) => {
160160 reply . send ( { hello : 'world' } )
161161 } )
162162
@@ -182,7 +182,7 @@ test('only sets max-age and ignores s-maxage with private header', async (t) =>
182182 const fastify = Fastify ( )
183183 await fastify . register ( plugin , opts )
184184
185- fastify . get ( '/' , ( req , reply ) => {
185+ fastify . get ( '/' , ( _req , reply ) => {
186186 reply . send ( { hello : 'world' } )
187187 } )
188188
@@ -210,7 +210,7 @@ test('s-maxage is optional with public header', async (t) => {
210210 const fastify = Fastify ( )
211211 await fastify . register ( plugin , opts )
212212
213- fastify . get ( '/' , ( req , reply ) => {
213+ fastify . get ( '/' , ( _req , reply ) => {
214214 reply . send ( { hello : 'world' } )
215215 } )
216216
@@ -230,7 +230,7 @@ test('sets no-store with max-age header', async (t) => {
230230 const fastify = Fastify ( )
231231 await fastify . register ( plugin , { privacy : 'no-store' , expiresIn : 300 } )
232232
233- fastify . get ( '/' , ( req , reply ) => {
233+ fastify . get ( '/' , ( _req , reply ) => {
234234 reply . send ( { hello : 'world' } )
235235 } )
236236
@@ -255,7 +255,7 @@ test('sets the expires header', async (t) => {
255255 const fastify = Fastify ( )
256256 await fastify . register ( plugin , { privacy : plugin . privacy . NOCACHE } )
257257
258- fastify . get ( '/' , ( req , reply ) => {
258+ fastify . get ( '/' , ( _req , reply ) => {
259259 reply . expires ( now ) . send ( { hello : 'world' } )
260260 } )
261261
@@ -275,7 +275,7 @@ test('sets the expires header to a falsy value', async (t) => {
275275 const fastify = Fastify ( )
276276 await fastify . register ( plugin , { privacy : plugin . privacy . NOCACHE } )
277277
278- fastify . get ( '/' , ( req , reply ) => {
278+ fastify . get ( '/' , ( _req , reply ) => {
279279 reply . expires ( ) . send ( { hello : 'world' } )
280280 } )
281281
@@ -294,7 +294,7 @@ test('sets the expires header to a custom value', async (t) => {
294294 const fastify = Fastify ( )
295295 await fastify . register ( plugin , { privacy : plugin . privacy . NOCACHE } )
296296
297- fastify . get ( '/' , ( req , reply ) => {
297+ fastify . get ( '/' , ( _req , reply ) => {
298298 reply . expires ( 'foobar' ) . send ( { hello : 'world' } )
299299 } )
300300
0 commit comments