Skip to content

Commit

Permalink
fix: removed unnecessary test cases
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 Jul 11, 2024
1 parent 2d6091f commit 4b09dcb
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions packages/relay/tests/lib/eth/eth_call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,6 @@ describe('@ethCall Eth Call spec', async function () {
process.env.ETH_CALL_DEFAULT_TO_CONSENSUS_NODE = 'true';
});

it('eth_call with missing `to` field', async function () {
await ethCallFailing(
ethImpl,
{
from: CONTRACT_ADDRESS_1,
data: CONTRACT_CALL_DATA,
gas: MAX_GAS_LIMIT_HEX,
},
'latest',
(error) => {
expect(error.message).to.equal(`Invalid Contract Address: ${undefined}.`);
},
);
});

it('eth_call with incorrect `to` field length', async function () {
await ethCallFailing(
ethImpl,
Expand Down Expand Up @@ -703,31 +688,12 @@ describe('@ethCall Eth Call spec', async function () {
expect((result as JsonRpcError).data).to.equal(defaultErrorMessageHex);
});

it('eth_call with missing `to` field', async function () {
const args = [
{
...defaultCallData,
from: CONTRACT_ADDRESS_1,
data: CONTRACT_CALL_DATA,
gas: MAX_GAS_LIMIT,
},
'latest',
];

await RelayAssertions.assertRejection(
predefined.INVALID_CONTRACT_ADDRESS(undefined),
ethImpl.call,
false,
ethImpl,
args,
);
});

it('eth_call with wrong `to` field', async function () {
const args = [
{
...defaultCallData,
from: CONTRACT_ADDRESS_1,
to: WRONG_CONTRACT_ADDRESS,
data: CONTRACT_CALL_DATA,
gas: MAX_GAS_LIMIT,
},
Expand Down

0 comments on commit 4b09dcb

Please sign in to comment.