(attributes: CookieSerializeOptions)
| 16 | let fastify: FastifyInstance; |
| 17 | |
| 18 | const setup = async (attributes: CookieSerializeOptions) => { |
| 19 | // Since register creates a new scope, we need to create a route inside the |
| 20 | // scope for the plugin to be applied. |
| 21 | await fastify.register(cookieUpdate, fastify => { |
| 22 | // eslint-disable-next-line @typescript-eslint/require-await |
| 23 | fastify.get('/', async () => { |
| 24 | return { hello: 'world' }; |
| 25 | }); |
| 26 | return { |
| 27 | cookies: ['cookie_name'], |
| 28 | attributes |
| 29 | }; |
| 30 | }); |
| 31 | }; |
| 32 | |
| 33 | beforeEach(async () => { |
| 34 | fastify = Fastify(); |
no outgoing calls
no test coverage detected