Skip to content

Commit ddc2cfd

Browse files
cmlooff4estgirlRuliwrTrineMedinaSchmang13
committed
Modified test suite
Co-authored-by: Abigail Gerig <[email protected]> Co-authored-by: Ruli Warner-Rosen <[email protected]> Co-authored-by: Trine Medina <[email protected]> Co-authored-by: Trine Medina <[email protected]> Co-authored-by: Matt Dias <[email protected]>
1 parent 1e1b9ba commit ddc2cfd

File tree

1 file changed

+88
-83
lines changed

1 file changed

+88
-83
lines changed

__tests__/ServerRoutes.test.js

Lines changed: 88 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,93 @@
11
const supertest = require('supertest');
2-
const server = require('../server/app');
2+
// const server = require('../server/app');
33

4-
const request = supertest(server);
4+
// const request = supertest(server);
55

6-
describe('Test Route /test', () => {
7-
describe('GET request on the test route', () => {
8-
// Test route to receive a status of 200 and a json object of success:true
9-
test('Should respond with a 200 status code', async () => {
10-
const response = await request.get('/test');
11-
expect(response.status).toBe(200);
12-
expect(response.body.success).toBe(true);
13-
});
14-
});
15-
16-
describe('POST request on the test route', () => {
17-
// Test route to receive a status of 200 and a json object of success:true
18-
test('Should respond with a 200 status code', async () => {
19-
const response = await request.get('/test');
20-
expect(response.status).toBe(200);
21-
expect(response.body.success).toBe(true);
22-
});
23-
});
24-
});
6+
// describe('Test Route /test', () => {
7+
// describe('GET request on the test route', () => {
8+
// // Test route to receive a status of 200 and a json object of success:true
9+
// test('Should respond with a 200 status code', async () => {
10+
// const response = await request.get('/test');
11+
// expect(response.status).toBe(200);
12+
// expect(response.body.success).toBe(true);
13+
// });
14+
// });
2515

16+
// describe('POST request on the test route', () => {
17+
// // Test route to receive a status of 200 and a json object of success:true
18+
// test('Should respond with a 200 status code', async () => {
19+
// const response = await request.get('/test');
20+
// expect(response.status).toBe(200);
21+
// expect(response.body.success).toBe(true);
22+
// });
23+
// });
24+
// });
2625

27-
/** Docketeer 7.0
26+
/** Docketeer 7.0
2827
* We could not figure out how to authenticate to postgres with Super Test so we were unable to confirm if these tests work.
2928
*/
3029

31-
3230
// describe('Settings Route /settings', () => {
33-
// GET request for default route
34-
// describe('GET request /settings/', () => {
35-
// test('Expect status code 200 and JSON object', async (done) => {
36-
// // return request.get('/settings/').then((response) => {
37-
// // expect(response.statusCode).toBe(200);
38-
// // done();
39-
// // });
40-
// const response = await request.get('/settings');
41-
// expect(response.status).toBe(200);
42-
// done();
43-
// });
44-
// });
45-
// describe('POST request /settings/insert', () => {
46-
// test('Expect status code 200 and JSON object', () => {
47-
// request(server)
48-
// .post('/settings/insert')
49-
// .expect(200)
50-
// .expect('Content/Type', /json/);
51-
// });
52-
// });
53-
// describe('POST request /settings/delete', () => {
54-
// test('Expect status code 200 and JSON object', () => {
55-
// request(server)
56-
// .post('/settings/delete')
57-
// .expect(200)
58-
// .expect('Content/Type', /json/);
59-
// });
60-
// });
61-
// describe('POST request /settings/phone', () => {
62-
// test('Expect status code 200 and JSON object', () => {
63-
// request(server)
64-
// .post('/settings/phone')
65-
// .expect(200)
66-
// .expect('Content/Type', /json/);
67-
// });
68-
// });
69-
// describe('POST request /settings/notification', () => {
70-
// test('Expect status code 200 and JSON object', () => {
71-
// request(server)
72-
// .post('/settings/notification')
73-
// .expect(200)
74-
// .expect('Content/Type', /json/);
75-
// });
76-
// });
77-
// describe('POST request /settings/monitoring', () => {
78-
// test('Expect status code 200 and JSON object', () => {
79-
// request(server)
80-
// .post('/settings/monitoring')
81-
// .expect(200)
82-
// .expect('Content/Type', /json/);
83-
// });
84-
// });
85-
// describe('POST request /settings/gitLinks', () => {
86-
// test('Expect status code 200 and JSON object', () => {
87-
// request(server)
88-
// .post('/settings/gitLinks')
89-
// .expect(200)
90-
// .expect('Content/Type', /json/);
91-
// });
92-
// });
31+
// GET request for default route
32+
// describe('GET request /settings/', () => {
33+
// test('Expect status code 200 and JSON object', async (done) => {
34+
// // return request.get('/settings/').then((response) => {
35+
// // expect(response.statusCode).toBe(200);
36+
// // done();
37+
// // });
38+
// const response = await request.get('/settings');
39+
// expect(response.status).toBe(200);
40+
// done();
41+
// });
42+
// });
43+
// describe('POST request /settings/insert', () => {
44+
// test('Expect status code 200 and JSON object', () => {
45+
// request(server)
46+
// .post('/settings/insert')
47+
// .expect(200)
48+
// .expect('Content/Type', /json/);
49+
// });
50+
// });
51+
// describe('POST request /settings/delete', () => {
52+
// test('Expect status code 200 and JSON object', () => {
53+
// request(server)
54+
// .post('/settings/delete')
55+
// .expect(200)
56+
// .expect('Content/Type', /json/);
57+
// });
58+
// });
59+
// describe('POST request /settings/phone', () => {
60+
// test('Expect status code 200 and JSON object', () => {
61+
// request(server)
62+
// .post('/settings/phone')
63+
// .expect(200)
64+
// .expect('Content/Type', /json/);
65+
// });
66+
// });
67+
// describe('POST request /settings/notification', () => {
68+
// test('Expect status code 200 and JSON object', () => {
69+
// request(server)
70+
// .post('/settings/notification')
71+
// .expect(200)
72+
// .expect('Content/Type', /json/);
73+
// });
74+
// });
75+
// describe('POST request /settings/monitoring', () => {
76+
// test('Expect status code 200 and JSON object', () => {
77+
// request(server)
78+
// .post('/settings/monitoring')
79+
// .expect(200)
80+
// .expect('Content/Type', /json/);
81+
// });
82+
// });
83+
// describe('POST request /settings/gitLinks', () => {
84+
// test('Expect status code 200 and JSON object', () => {
85+
// request(server)
86+
// .post('/settings/gitLinks')
87+
// .expect(200)
88+
// .expect('Content/Type', /json/);
89+
// });
90+
// });
9391
// });
9492

9593
// describe('Initiate Metric Database Route /init', () => {
@@ -137,3 +135,10 @@ describe('Test Route /test', () => {
137135
// });
138136
// });
139137
// });
138+
139+
//* Dummy Test
140+
describe('dummy test', () => {
141+
test('dummy test', () => {
142+
expect(2 + 2).toBe(4);
143+
});
144+
});

0 commit comments

Comments
 (0)