Skip to content

Commit

Permalink
test: added acceptance test
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
  • Loading branch information
quiet-node committed Jan 28, 2025
1 parent 506fd91 commit 98fcea8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/server/tests/acceptance/rpc_batch1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,24 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
}
});

it('should return empty logs if `toBlock` is not found', async () => {
const notExistedLog = latestBlock + 99;

const logs = await relay.call(
RelayCalls.ETH_ENDPOINTS.ETH_GET_LOGS,
[
{
fromBlock: log0Block.blockNumber,
toBlock: `0x${notExistedLog.toString(16)}`,
address: [contractAddress, contractAddress2],
},
],
requestIdPrefix,
);

expect(logs.length).to.eq(0);
});

it('should be able to use `address` param', async () => {
//when we pass only address, it defaults to the latest block
const logs = await relay.call(
Expand Down

0 comments on commit 98fcea8

Please sign in to comment.