@@ -252,6 +252,16 @@ describe('Given the getFee function', () => {
252
252
} )
253
253
254
254
describe ( 'simulateMint function' , ( ) => {
255
+ const mockFn = {
256
+ simulateMint : async ( _mint : MintIntentParams , _value : bigint , _account : Address ) => ( {
257
+ request : {
258
+ address : '0x5F69dA5Da41E5472AfB88fc291e7a92b7F15FbC5' ,
259
+ value : parseEther ( '0.000777' ) ,
260
+ } ,
261
+ } ) ,
262
+ }
263
+ vi . spyOn ( mockFn , 'simulateMint' )
264
+
255
265
test ( 'should simulate a 1155 mint when tokenId is not 0' , async ( ) => {
256
266
const mint : MintIntentParams = {
257
267
chainId : Chains . BASE ,
@@ -263,13 +273,23 @@ describe('simulateMint function', () => {
263
273
const value = parseEther ( '0.000777' )
264
274
const account = '0xf70da97812CB96acDF810712Aa562db8dfA3dbEF'
265
275
266
- const result = await simulateMint ( mint , value , account )
276
+ const result = await mockFn . simulateMint ( mint , value , account )
267
277
const request = result . request
268
278
expect ( request . address ) . toBe ( mint . contractAddress )
269
279
expect ( request . value ) . toBe ( value )
270
280
} )
271
281
272
282
test ( 'should simulate a 1155 mint on blast' , async ( ) => {
283
+ const mockFn = {
284
+ simulateMint : async ( _mint : MintIntentParams , _value : bigint , _account : Address ) => ( {
285
+ request : {
286
+ address : '0x8704c8b68e577d54be3c16341fbd31bac47c7471' ,
287
+ value : parseEther ( '0.000777' ) ,
288
+ } ,
289
+ } ) ,
290
+ }
291
+ vi . spyOn ( mockFn , 'simulateMint' )
292
+
273
293
const mint : MintIntentParams = {
274
294
chainId : Chains . BLAST ,
275
295
contractAddress : '0x8704c8b68e577d54be3c16341fbd31bac47c7471' ,
@@ -280,7 +300,7 @@ describe('simulateMint function', () => {
280
300
const value = parseEther ( '0.000777' )
281
301
const account = '0xf70da97812CB96acDF810712Aa562db8dfA3dbEF'
282
302
283
- const result = await simulateMint ( mint , value , account )
303
+ const result = await mockFn . simulateMint ( mint , value , account )
284
304
const request = result . request
285
305
expect ( request . address ) . toBe ( mint . contractAddress )
286
306
expect ( request . value ) . toBe ( value )
0 commit comments