-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.test.js
More file actions
36 lines (31 loc) · 781 Bytes
/
app.test.js
File metadata and controls
36 lines (31 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint-disable */
const request = require('supertest');
const app = require('./app');
describe('Testing the test methods', () => {
test('GET /test/get succeeds', () => {
return request(app)
.get('/test/get')
.expect(200);
});
test('GET /test/get/:index succeeds', () => {
return request(app)
.get('/test/get/0')
.expect(200);
});
test('POST /test/new succeeds', () => {
return request(app)
.post('/test/new')
.send({
message: 'Hello World!'
})
.expect(200);
});
test('POST /test/remove succeeds', () => {
return request(app)
.post('/test/remove')
.send({
index: -1
})
.expect(200);
});
});