MCPcopy Index your code
hub / github.com/freeCodeCamp/freeCodeCamp / setup

Function setup

api/src/plugins/cookie-update.test.ts:18–31  ·  view source on GitHub ↗
(attributes: CookieSerializeOptions)

Source from the content-addressed store, hash-verified

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();

Callers 2

global-setup.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected