-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
99 lines (78 loc) · 2.42 KB
/
test.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
const mongoose = require("mongoose");
const db = require("./config/keys").mongoURI;
// Import testfiles
const EventTest=require('./routes/test/eventsTEST');
beforeAll(async () => {
jest.setTimeout(30000);
mongoose.Promise = Promise;
await mongoose
.connect(db, { useNewUrlParser: true })
.then(() => console.log("Connected to MongoDB"))
.catch(err => console.log(err));
});
const NTest = require("./routes/test/notificationsTEST");
const ERTest = require('./routes/test/eventrequestsTEST')
const OITest = require('./routes/test/orientationinvitationsTEST')
const ApTest = require('./routes/test/applicationsTEST')
const PRTest = require('./routes/test/projectsTEST')
const CATest = require('./routes/test/consultancyagencysTEST')
const ATest = require('./routes/test/adminsTEST')
const MTest = require('./routes/test/membersTEST')
const PaTest = require('./routes/test/partnersTEST')
// Calling the test files
const nTests = new NTest(8000, "/notifications");
const eTests = new EventTest(8000,'/events')
const erTests = new ERTest(8000, '/eventrequests')
const oiTests = new OITest(8000, '/orientationinvitations')
const apTests = new ApTest(8000, '/applications')
const prTests = new PRTest(8000, '/projects')
const caTests = new CATest(8000, '/consultancyagency')
const aTests = new ATest(8000, '/admins')
const mTests = new MTest(8000, '/members')
const paTests = new PaTest(8000, '/partners')
// Calling tests
describe("Event Requests Tests", () => {
Promise.all([erTests.run()]).then(result => {});
});
describe("Notifications Tests", () => {
Promise.all([nTests.run()]).then(result => {});
});
describe("Admins Tests", () => {
Promise.all([aTests.run()]).then(result => {});
});
describe('Event Tests', () => {
Promise.all([
eTests.run(),
]).then(result => {})
})
describe("Partner Tests", () => {
Promise.all([paTests.run()]).then(result => {});
});
describe('Applications Tests', () => {
Promise.all([
apTests.run(),
]).then(result => {})
})
describe('Consultancy Agencys Tests', () => {
Promise.all([
caTests.run(),
]).then(result => {})
})
describe('Projects Tests', () => {
Promise.all([
prTests.run(),
]).then(result => {})
})
describe('Member Tests', () => {
Promise.all([
mTests.run(),
]).then(result => {})
})
describe('orientation invitation Tests', () => {
Promise.all([
oiTests.run(),
]).then(result => {})
})
afterAll(async () => {
mongoose.disconnect();
});