This commit is contained in:
fr
2024-04-30 00:50:34 +02:00
parent ff8cc4cccf
commit dc1b955a8a
6 changed files with 90 additions and 11 deletions
+9
View File
@@ -0,0 +1,9 @@
import { connectDB, dropDB, dropCollections } from '../src/utils/test_mongodb';
beforeAll(async () => {
await connectDB();
});
afterAll(async () => {
await dropDB();
});
+17
View File
@@ -0,0 +1,17 @@
import request from "supertest"
import {server as app} from "../server"
describe('Auth API Endpoints', () => {
afterAll((done) => {
app.close(done);
})
it('should signup new user', async () => {
const res = await request(app)
.post('/api/auth/signup')
.send({});
expect(res.statusCode).toEqual(200)
})
})