Pending
This commit is contained in:
9
api/tests/_setupFile.ts
Normal file
9
api/tests/_setupFile.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { connectDB, dropDB, dropCollections } from '../src/utils/test_mongodb';
|
||||
|
||||
beforeAll(async () => {
|
||||
await connectDB();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await dropDB();
|
||||
});
|
17
api/tests/auth.test.ts
Normal file
17
api/tests/auth.test.ts
Normal 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)
|
||||
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user