-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.js
45 lines (44 loc) · 906 Bytes
/
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
const orgmanager = require('./index.js')
const token = process.env.token || ''
const id = process.env.id || 1
const password = process.env.password || ''
const brutal = process.env.brutal || false
const client = new orgmanager(token)
var n = 0
async function test() {
n++
console.log(`Test ${n}`)
await client.getRoot()
n++
console.log(`Test ${n}`)
await client.getStats()
n++
console.log(`Test ${n}`)
await client.getUser()
n++
console.log(`Test ${n}`)
await client.getOrgs()
n++
console.log(`Test ${n}`)
await client.getOrg(id)
n++
console.log(`Test ${n}`)
await client.updateOrg(id)
n++
console.log(`Test ${n}`)
await client.changeOrgPassword(id, password)
n++
console.log(`Test ${n}`)
}
test()
async function functionName() {
n++
console.log(`Test ${n}`)
await regenerateToken(true)
n++
console.log(`Test ${n}`)
await deleteOrg(id)
}
if (brutal == true) {
brutalTest()
}