-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.js
More file actions
32 lines (30 loc) · 1.51 KB
/
test.js
File metadata and controls
32 lines (30 loc) · 1.51 KB
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
const dotenv = require('dotenv')
dotenv.config()
const port = process.env.PORT || 3001
const mongoose = require('mongoose')
const db = process.env.mongoURI
const AdminsTest = require('./tests/admin')
const ReviewerTest = require("./tests/reviewer")
const casesTest = require('./tests/case')
const lawyerTest = require('./tests/lawyer')
const TasksTest = require("./tests/task")
const externalEntityTest = require('./tests/externalEntity')
const investorTest = require('./tests/investor')
const CompanyTest = require('./tests/Company')
mongoose.connect(db, {useNewUrlParser: true}).then(() => console.log('Connected to Database')).catch(err => console.log(err))
const admins = new AdminsTest(port, 'admin')
const task = new TasksTest(port,'task')
const reviewer = new ReviewerTest(port,'reviewer')
const cases = new casesTest(port,'cases')
const lawyer = new lawyerTest(port,'lawyer')
const investor = new investorTest(port,'investor')
const externalEntity = new externalEntityTest(port,'externalEntitys')
const Company = new CompanyTest(port,'Company')
Promise.all([admins.runIndependently()]).then(result => {})
Promise.all([cases.runIndependently()]).then(result => {})
Promise.all([task.runIndependently()]).then(result => {})
Promise.all([reviewer.runIndependently()]).then(result => {})
Promise.all([lawyer.runIndependently()]).then(result => {})
Promise.all([investor.runIndependently()]).then(result => {})
Promise.all([externalEntity.runIndependently()]).then(result => {})
Promise.all([Company.runIndependently()]).then(result => {})