-
Notifications
You must be signed in to change notification settings - Fork 308
/
fixtures.ts
75 lines (73 loc) · 1.7 KB
/
fixtures.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import nock from 'nock'
export function mockCoinpaprikaAdapterResponseSuccess() {
nock('http://localhost:8081')
.post('/', { id: '1', data: { base: 'AVAX', quote: 'USD', endpoint: 'crypto' } })
.reply(
200,
{
jobRunID: '1',
providerStatusCode: 200,
statusCode: 200,
data: {
result: 78.9965141378473,
},
result: 78.9965141378473,
},
[
'X-Powered-By',
'Express',
'X-RateLimit-Limit',
'250',
'X-RateLimit-Remaining',
'249',
'Date',
'Mon, 08 Nov 2021 12:31:31 GMT',
'X-RateLimit-Reset',
'1636374693',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'92',
'ETag',
'W/"5c-z1n244ezdMwpLTzNvSBGxzBiHkA"',
'Connection',
'close',
],
)
}
export function mockCoinpaprikaAdapterResponseZeroValue() {
nock('http://localhost:8081')
.post('/', { id: '1', data: { base: 'AVAX', quote: 'USD', endpoint: 'crypto' } })
.reply(
200,
{
jobRunID: '1',
providerStatusCode: 200,
statusCode: 200,
data: {
result: 0,
},
result: 0,
},
[
'X-Powered-By',
'Express',
'X-RateLimit-Limit',
'250',
'X-RateLimit-Remaining',
'249',
'Date',
'Mon, 08 Nov 2021 12:31:31 GMT',
'X-RateLimit-Reset',
'1636374693',
'Content-Type',
'application/json; charset=utf-8',
'Content-Length',
'92',
'ETag',
'W/"5c-z1n244ezdMwpLTzNvSBGxzBiHkA"',
'Connection',
'close',
],
)
}