forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
37 lines (31 loc) · 924 Bytes
/
test.js
File metadata and controls
37 lines (31 loc) · 924 Bytes
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
import { ensure, dbNameFromFile } from 'arango-tools'
import { databaseOptions } from '../../../../database-options'
import dbschema from '../../api/database.json'
beforeAll(async () => {
;({ query, drop, truncate, collections } = await ensure({
type: 'database',
name: dbNameFromFile(__filename),
url,
rootPassword: rootPass,
options: databaseOptions({ rootPass }),
}))
})
// Generate list of collections names
const collectionStrings = []
for (const property in collections) {
collectionStrings.push(property.toString())
}
// something that should not be removed
const bar = [1,2,3]
for (const foo in bar) {
bar.push(foo)
}
// Setup Transaction
const trx = await transaction(collectionStrings)
console.warn('warning!!!')
console.log('logging!')
console.error('so bad!')
export const average = (a, b) => {
console.log('calling average with ' + arguments)
return divide(sum(a, b), 2)
}