express_backend / server /tests /getHello.test.ts
Joel Refuerzo
Initial commit: add client and server
50a7502
Raw History Blame Contribute Delete
417 Bytes
import express, { Application } from 'express';
import request from 'supertest';
import getHello from '../src/controllers/getter.controller.js';
const app = express();
app.get('/', getHello);
describe('GET /', () => {
it('should return "Hello World"', async () => {
const res = await request(app).get('/');
expect(res.status).toBe(200);
expect(res.text).toBe('Hello World');
});
});