@@ -6,6 +6,7 @@ import * as nock from 'nock'
66import {
77 mockETHGoerliContractCallResponseSuccess ,
88 mockETHMainnetContractCallResponseSuccess ,
9+ mockAptosSuccess ,
910} from './fixtures'
1011import * as process from 'process'
1112
@@ -23,10 +24,12 @@ describe('execute', () => {
2324 process . env . ETHEREUM_GOERLI_RPC_URL ?? 'http://localhost:8554'
2425 process . env . ETHEREUM_GOERLI_CHAIN_ID = process . env . ETHEREUM_GOERLI_CHAIN_ID ?? '5'
2526 process . env . BACKGROUND_EXECUTE_MS = '0'
27+ process . env . APTOS_URL = process . env . APTOS_URL ?? 'http://fake-aptos'
2628 const mockDate = new Date ( '2001-01-01T11:11:11.111Z' )
2729 spy = jest . spyOn ( Date , 'now' ) . mockReturnValue ( mockDate . getTime ( ) )
2830
2931 const adapter = ( await import ( './../../src' ) ) . adapter
32+ adapter . rateLimiting = undefined
3033 testAdapter = await TestAdapter . startWithMockedCache ( adapter , {
3134 testAdapter : { } as TestAdapter < never > ,
3235 } )
@@ -110,4 +113,16 @@ describe('execute', () => {
110113 expect ( response . json ( ) ) . toMatchSnapshot ( )
111114 } )
112115 } )
116+
117+ describe ( 'aptos endpoint' , ( ) => {
118+ it ( 'should return success' , async ( ) => {
119+ mockAptosSuccess ( )
120+ const response = await testAdapter . request ( {
121+ endpoint : 'aptos' ,
122+ signature : '0x1::chain_id::get' ,
123+ } )
124+ expect ( response . statusCode ) . toBe ( 200 )
125+ expect ( response . json ( ) ) . toMatchSnapshot ( )
126+ } )
127+ } )
113128} )
0 commit comments