Revert "ran 'npx standard --fix'"

This reverts commit 0dc67edc9b.
This commit is contained in:
xfarrow
2024-02-22 17:39:29 +01:00
parent 0dc67edc9b
commit 2a321916ff
12 changed files with 596 additions and 564 deletions

View File

@ -1,30 +1,30 @@
// Run me with "npm test"
const request = require('supertest')
const app = require('../src/app')
require('dotenv').config({ path: '../src/.env' })
const request = require('supertest');
const app = require('../src/app');
require('dotenv').config({ path: '../src/.env' });
describe('Person Tests', () => {
test('Correct registration', async () => {
const response = await request(app)
.post('/api/register')
.send({
email: 'johntestdoe@mail.org',
password: 'password',
display_name: 'John Doe'
})
expect(response.status).toBe(200)
expect(response.body).toEqual({ activationLink: expect.any(String) })
})
.post('/api/register')
.send({
email : "johntestdoe@mail.org",
password : "password",
display_name : "John Doe"
})
expect(response.status).toBe(200);
expect(response.body).toEqual({ activationLink: expect.any(String) });
});
test('Incorrect registration', async () => {
const response = await request(app)
.post('/api/register')
.send({
email: 'this is not an email',
password: 'password',
display_name: 'John Doe'
})
expect(response.status).toBe(400)
})
})
.post('/api/register')
.send({
email : "this is not an email",
password : "password",
display_name : "John Doe"
})
expect(response.status).toBe(400);
});
});