-
Notifications
You must be signed in to change notification settings - Fork 308
/
adapter.test.ts
33 lines (28 loc) · 1.12 KB
/
adapter.test.ts
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
import { makeConfig } from '../../src/config'
describe('execute', () => {
const SOLIDO_ADDRESS = 'EMtjYGwPnXdtqK5SGL8CWGv4wgdBQN79UPoy53x9bBTJ'
const STSOL_ADDRESS = 'BSGfVnE6q6KemspkugEERU8x7WbQwSKwvHT1cZZ4ACVN'
const BSOL_ADDRESS = '3FMBoeddUhtqxepzkrxPrMUV3CL4bZM5QmMoLJfEpirz'
const SOLIDO_CONTRACT_VERSION = '0'
beforeEach(() => {
process.env.SOLIDO_ADDRESS = SOLIDO_ADDRESS
process.env.STSOL_ADDRESS = STSOL_ADDRESS
process.env.BSOL_ADDRESS = BSOL_ADDRESS
process.env.SOLIDO_CONTRACT_VERSION = SOLIDO_CONTRACT_VERSION
})
afterEach(() => {
delete process.env.SOLIDO_ADDRESS
delete process.env.STSOL_ADDRESS
delete process.env.BSOL_ADDRESS
delete process.env.SOLIDO_CONTRACT_VERSION
})
describe('config', () => {
it('correctly sets the config from env vars', async () => {
const config = makeConfig()
expect(config.solidoAddress).toEqual(SOLIDO_ADDRESS)
expect(config.stSolAddress).toEqual(STSOL_ADDRESS)
expect(config.bSolAddress).toEqual(BSOL_ADDRESS)
expect(config.solidoContractVersion).toEqual(parseInt(SOLIDO_CONTRACT_VERSION))
})
})
})