Skip to content

Commit

Permalink
remove before
Browse files Browse the repository at this point in the history
  • Loading branch information
sevelinCa committed May 17, 2024
1 parent 668246e commit 5782814
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/__test__/user.test.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import request from 'supertest';
import {app} from '..'

let server: any;
beforeAll(() => {
server = app.listen(4000, () => {
console.log('Test server running on port 4000');
});
});

afterAll((done) => {
server.close(done);
});

describe("Welcome endpoint",()=>{

it('should return welcome message and status 200 ', async()=>{
const response = await request(app).get('/');
expect(response.status).toBe(200);
expect(response.text).toContain("<h1 style='text-align:center;font-family: sans-serif'>Welcome to our backend as code crafters team </h1>");

});
})

0 comments on commit 5782814

Please sign in to comment.