@@ -3,12 +3,12 @@ import { callFunctions } from './callFunctions'
3
3
import * as example from '../functions/example'
4
4
5
5
test ( 'Returns `abi` when the passed options.method is "abi"' , async ( t ) => {
6
- const res = await callFunctions ( example , { id : '' , method : 'abi' } as any )
6
+ const res = await callFunctions ( example , { } as any , { id : '' , method : 'abi' } as any )
7
7
t . is ( res , example . abi )
8
8
} )
9
9
10
10
test ( 'Calls `addresses` when the passed options.method is "addresses"' , async ( t ) => {
11
- const res = await callFunctions ( example , {
11
+ const res = await callFunctions ( example , { } as any , {
12
12
id : '' ,
13
13
method : 'addresses' ,
14
14
options : { network : 'mainnet' } ,
@@ -17,7 +17,7 @@ test('Calls `addresses` when the passed options.method is "addresses"', async (t
17
17
} )
18
18
19
19
test ( 'Calls `authorize` when the passed options.method is "authorize"' , async ( t ) => {
20
- const res = await callFunctions ( example , {
20
+ const res = await callFunctions ( example , { } as any , {
21
21
id : '' ,
22
22
method : 'authorize' ,
23
23
options : { message : '' , secret : '' , request : { } as any } ,
@@ -26,7 +26,7 @@ test('Calls `authorize` when the passed options.method is "authorize"', async (t
26
26
} )
27
27
28
28
test ( 'Calls `oraclize` when the passed options.method is "oraclize"' , async ( t ) => {
29
- const res = await callFunctions ( example , {
29
+ const res = await callFunctions ( example , { } as any , {
30
30
id : '' ,
31
31
method : 'oraclize' ,
32
32
options : {
@@ -47,7 +47,7 @@ test('Calls `oraclize` when the passed options.method is "oraclize"', async (t)
47
47
} )
48
48
49
49
test ( 'Calls `event` when the passed options.method is "event"' , async ( t ) => {
50
- const res = await callFunctions ( example , {
50
+ const res = await callFunctions ( example , { } as any , {
51
51
id : '' ,
52
52
method : 'event' ,
53
53
options : {
@@ -58,7 +58,7 @@ test('Calls `event` when the passed options.method is "event"', async (t) => {
58
58
} )
59
59
60
60
test ( 'Calls `pack` when the passed options.method is "pack"' , async ( t ) => {
61
- const res = await callFunctions ( example , {
61
+ const res = await callFunctions ( example , { } as any , {
62
62
id : '' ,
63
63
method : 'pack' ,
64
64
options : {
@@ -74,15 +74,15 @@ test('Calls `pack` when the passed options.method is "pack"', async (t) => {
74
74
75
75
test ( 'Returns undefined when the passed options.method is "addresses" but options.options is not passed' , async ( t ) => {
76
76
t . is (
77
- await callFunctions ( example , {
77
+ await callFunctions ( example , { } as any , {
78
78
id : '' ,
79
79
method : 'addresses' ,
80
80
options : { network : undefined } ,
81
81
} ) ,
82
82
undefined
83
83
)
84
84
t . is (
85
- await callFunctions ( example , {
85
+ await callFunctions ( example , { } as any , {
86
86
id : '' ,
87
87
method : 'addresses' ,
88
88
} ) ,
@@ -92,39 +92,39 @@ test('Returns undefined when the passed options.method is "addresses" but option
92
92
93
93
test ( 'Returns undefined when the passed options.method is "authorize" but options.options is not passed' , async ( t ) => {
94
94
t . is (
95
- await callFunctions ( example , {
95
+ await callFunctions ( example , { } as any , {
96
96
id : '' ,
97
97
method : 'authorize' ,
98
98
options : { message : '' , secret : '' , request : undefined } ,
99
99
} ) ,
100
100
undefined
101
101
)
102
102
t . is (
103
- await callFunctions ( example , {
103
+ await callFunctions ( example , { } as any , {
104
104
id : '' ,
105
105
method : 'authorize' ,
106
106
options : { message : '' , secret : undefined , request : { } as any } ,
107
107
} ) ,
108
108
undefined
109
109
)
110
110
t . is (
111
- await callFunctions ( example , {
111
+ await callFunctions ( example , { } as any , {
112
112
id : '' ,
113
113
method : 'authorize' ,
114
114
options : { message : undefined , secret : '' , request : { } as any } ,
115
115
} ) ,
116
116
undefined
117
117
)
118
118
t . is (
119
- await callFunctions ( example , {
119
+ await callFunctions ( example , { } as any , {
120
120
id : '' ,
121
121
method : 'authorize' ,
122
122
options : { message : undefined , secret : undefined , request : undefined } ,
123
123
} ) ,
124
124
undefined
125
125
)
126
126
t . is (
127
- await callFunctions ( example , {
127
+ await callFunctions ( example , { } as any , {
128
128
id : '' ,
129
129
method : 'authorize' ,
130
130
} ) ,
@@ -134,7 +134,7 @@ test('Returns undefined when the passed options.method is "authorize" but option
134
134
135
135
test ( 'Returns undefined when the passed options.method is "oraclize" but options.options is not passed' , async ( t ) => {
136
136
t . is (
137
- await callFunctions ( example , {
137
+ await callFunctions ( example , { } as any , {
138
138
id : '' ,
139
139
method : 'oraclize' ,
140
140
options : {
@@ -150,7 +150,7 @@ test('Returns undefined when the passed options.method is "oraclize" but options
150
150
undefined
151
151
)
152
152
t . is (
153
- await callFunctions ( example , {
153
+ await callFunctions ( example , { } as any , {
154
154
id : '' ,
155
155
method : 'oraclize' ,
156
156
options : {
@@ -162,7 +162,7 @@ test('Returns undefined when the passed options.method is "oraclize" but options
162
162
undefined
163
163
)
164
164
t . is (
165
- await callFunctions ( example , {
165
+ await callFunctions ( example , { } as any , {
166
166
id : '' ,
167
167
method : 'oraclize' ,
168
168
options : {
@@ -178,7 +178,7 @@ test('Returns undefined when the passed options.method is "oraclize" but options
178
178
undefined
179
179
)
180
180
t . is (
181
- await callFunctions ( example , {
181
+ await callFunctions ( example , { } as any , {
182
182
id : '' ,
183
183
method : 'oraclize' ,
184
184
options : {
@@ -190,7 +190,7 @@ test('Returns undefined when the passed options.method is "oraclize" but options
190
190
undefined
191
191
)
192
192
t . is (
193
- await callFunctions ( example , {
193
+ await callFunctions ( example , { } as any , {
194
194
id : '' ,
195
195
method : 'oraclize' ,
196
196
} ) ,
@@ -200,7 +200,7 @@ test('Returns undefined when the passed options.method is "oraclize" but options
200
200
201
201
test ( 'Returns undefined when the passed options.method is "event" but options.options is not passed' , async ( t ) => {
202
202
t . is (
203
- await callFunctions ( example , {
203
+ await callFunctions ( example , { } as any , {
204
204
id : '' ,
205
205
method : 'event' ,
206
206
options : {
@@ -210,7 +210,7 @@ test('Returns undefined when the passed options.method is "event" but options.op
210
210
undefined
211
211
)
212
212
t . is (
213
- await callFunctions ( example , {
213
+ await callFunctions ( example , { } as any , {
214
214
id : '' ,
215
215
method : 'event' ,
216
216
} ) ,
@@ -220,7 +220,7 @@ test('Returns undefined when the passed options.method is "event" but options.op
220
220
221
221
test ( 'Returns undefined when the passed options.method is "pack" but options.options is not passed' , async ( t ) => {
222
222
t . is (
223
- await callFunctions ( example , {
223
+ await callFunctions ( example , { } as any , {
224
224
id : '' ,
225
225
method : 'pack' ,
226
226
options : {
@@ -230,7 +230,7 @@ test('Returns undefined when the passed options.method is "pack" but options.opt
230
230
undefined
231
231
)
232
232
t . is (
233
- await callFunctions ( example , {
233
+ await callFunctions ( example , { } as any , {
234
234
id : '' ,
235
235
method : 'pack' ,
236
236
} ) ,
0 commit comments