Dashboard  2
Lot's of data
Loading...
Searching...
No Matches
root_route.test.ts
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2024
3** area-rattrapage
4** File description:
5** test_route_api.ts
6*/
7
8import request from 'supertest';
9import { describe, it, expect } from '@jest/globals';
10import app from '../src/index';
11
12describe('GET /', () => {
13 it('should return 200 and a welcome message', async () => {
14 const response = await request(app).get('/');
15 expect(response.status).toBe(200);
16 console.log(response.body);
17 console.log(response.body.message);
18 console.log(`type: body: ${typeof (response.body)}`);
19 console.log(`type: body.message: ${typeof (response.body.message)}`);
20 expect(response.body.message).toBe('Hello, World!');
21 });
22});