@@ -15,30 +15,28 @@ const gasSettings = {
15
15
maxScalingMultiplier : 2 ,
16
16
} ;
17
17
18
- test ( 'validates example config' , async ( ) => {
18
+ test ( 'validates example config' , ( ) => {
19
19
const exampleConfig = JSON . parse ( readFileSync ( join ( __dirname , '../../config/airseeker.example.json' ) , 'utf8' ) ) ;
20
20
21
21
// The mnemonic is not interpolated (and thus invalid).
22
- await expect ( configSchema . parseAsync ( exampleConfig ) ) . rejects . toStrictEqual (
22
+ expect ( ( ) => configSchema . parse ( exampleConfig ) ) . toThrow (
23
23
new ZodError ( [
24
+ {
25
+ code : 'custom' ,
26
+ message : 'Invalid mnemonic' ,
27
+ path : [ 'sponsorWalletMnemonic' ] ,
28
+ } ,
24
29
{
25
30
validation : 'url' ,
26
31
code : 'invalid_string' ,
27
32
message : 'Invalid url' ,
28
33
path : [ 'chains' , '31337' , 'providers' , 'hardhat' , 'url' ] ,
29
34
} ,
30
- {
31
- code : 'custom' ,
32
- message : 'Invalid mnemonic' ,
33
- path : [ 'sponsorWalletMnemonic' ] ,
34
- } ,
35
35
] )
36
36
) ;
37
37
38
38
const exampleSecrets = dotenv . parse ( readFileSync ( join ( __dirname , '../../config/secrets.example.env' ) , 'utf8' ) ) ;
39
- await expect ( configSchema . parseAsync ( interpolateSecrets ( exampleConfig , exampleSecrets ) ) ) . resolves . toStrictEqual (
40
- expect . any ( Object )
41
- ) ;
39
+ expect ( configSchema . parse ( interpolateSecrets ( exampleConfig , exampleSecrets ) ) ) . toStrictEqual ( expect . any ( Object ) ) ;
42
40
} ) ;
43
41
44
42
describe ( 'chains schema' , ( ) => {
@@ -73,7 +71,7 @@ describe('chains schema', () => {
73
71
} ) ;
74
72
} ) ;
75
73
76
- it ( 'uses loads the contract address from airnode-protocol-v1' , ( ) => {
74
+ it ( 'uses the contract address from airnode-protocol-v1' , ( ) => {
77
75
const chains = {
78
76
'1' : {
79
77
providers : {
@@ -111,6 +109,9 @@ describe('chains schema', () => {
111
109
url : 'http://localhost:8545' ,
112
110
} ,
113
111
} ,
112
+ contracts : {
113
+ DapiDataRegistry : '0xDD78254f864F97f65e2d86541BdaEf88A504D2B2' ,
114
+ } ,
114
115
__Temporary__DapiDataRegistry : {
115
116
airnodeToSignedApiUrl : { } ,
116
117
dataFeedIdToBeacons : { } ,
@@ -187,6 +188,7 @@ describe('chains schema', () => {
187
188
'31337' : {
188
189
contracts : {
189
190
Api3ServerV1 : '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512' ,
191
+ DapiDataRegistry : '0xDD78254f864F97f65e2d86541BdaEf88A504D2B2' ,
190
192
} ,
191
193
providers : { } ,
192
194
__Temporary__DapiDataRegistry : {
0 commit comments