|
1 | 1 | const supertest = require('supertest');
|
2 |
| -const server = require('../server/app'); |
| 2 | +// const server = require('../server/app'); |
3 | 3 |
|
4 |
| -const request = supertest(server); |
| 4 | +// const request = supertest(server); |
5 | 5 |
|
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 | +// }); |
25 | 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 | +// }); |
26 | 25 |
|
27 |
| -/** Docketeer 7.0 |
| 26 | +/** Docketeer 7.0 |
28 | 27 | * We could not figure out how to authenticate to postgres with Super Test so we were unable to confirm if these tests work.
|
29 | 28 | */
|
30 | 29 |
|
31 |
| - |
32 | 30 | // 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 | +// }); |
93 | 91 | // });
|
94 | 92 |
|
95 | 93 | // describe('Initiate Metric Database Route /init', () => {
|
@@ -137,3 +135,10 @@ describe('Test Route /test', () => {
|
137 | 135 | // });
|
138 | 136 | // });
|
139 | 137 | // });
|
| 138 | + |
| 139 | +//* Dummy Test |
| 140 | +describe('dummy test', () => { |
| 141 | + test('dummy test', () => { |
| 142 | + expect(2 + 2).toBe(4); |
| 143 | + }); |
| 144 | +}); |
0 commit comments