-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.setup.js
35 lines (30 loc) · 838 Bytes
/
jest.setup.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
beforeAll(async () => {
const ccxt = require ('ccxt');
const mockExchange = require('ccxt-faker');
global.first_account = new mockExchange.fake({})
global.second_account = new mockExchange.fake({})
let json = {
"exchanges": [
{
"account": "first_account",
"exchange": "testExchange1",
"key": "qwerty",
"secret": "ytrewq",
"params": { "currency": "BTC" }
}, {
"account": "second_account",
"exchange": "testExchange2",
"key": "qwerty",
"secret": "ytrewq",
"params": { "currency": "ETH" }
}, {
"account": "third_account",
"exchange": "testExchange3",
"key": "qwerty",
"secret": "ytrewq"
}
]
}
const Config = require('./class_config.js')
global.config = new Config(json)
});