mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(api): remove / handler (#55428)
This commit is contained in:
committed by
GitHub
parent
7c36fed6c1
commit
fbf28bbb4c
@@ -93,9 +93,6 @@ export const build = async (
|
||||
|
||||
void fastify.register(security);
|
||||
|
||||
fastify.get('/', async (_request, _reply) => {
|
||||
return { hello: 'world' };
|
||||
});
|
||||
// NOTE: Awaited to ensure `.use` is registered on `fastify`
|
||||
await fastify.register(express);
|
||||
|
||||
|
||||
@@ -33,16 +33,6 @@ describe('server', () => {
|
||||
});
|
||||
|
||||
describe('GET /', () => {
|
||||
test('have a 200 response', async () => {
|
||||
const res = await superRequest('/', { method: 'GET' });
|
||||
expect(res.statusCode).toBe(200);
|
||||
});
|
||||
|
||||
test('return { "hello": "world"}', async () => {
|
||||
const res = await superRequest('/', { method: 'GET' });
|
||||
expect(res.body).toEqual({ hello: 'world' });
|
||||
});
|
||||
|
||||
test('should have OWASP recommended headers', async () => {
|
||||
const res = await superRequest('/', { method: 'GET' });
|
||||
expect(res.headers).toMatchObject({
|
||||
|
||||
Reference in New Issue
Block a user