Skip to content

Commit

Permalink
test: updated contract-estimation-tests-spec.ts assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Jan 5, 2024
1 parent 40b1ec7 commit fc646c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integration-tests/contract-estimation-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(472);
expect(estimate.totalCost).toEqual(472);
expect(estimate.usingBaseFeeMutez).toEqual(472);
expect(estimate.consumedMilligas).toEqual(1356142);
expect(estimate.consumedMilligas).toEqual(1356228);
});

it('Verify .estimate.transfer for multiple internal transfers to unallocated account', async () => {
Expand All @@ -118,7 +118,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(543);
expect(estimate.totalCost).toEqual(129043);
expect(estimate.usingBaseFeeMutez).toEqual(543);
expect(estimate.consumedMilligas).toEqual(1470671);
expect(estimate.consumedMilligas).toEqual(1470757);
});

it('Verify .estimate.transfer for internal origination', async () => {
Expand All @@ -131,20 +131,20 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(519);
expect(estimate.totalCost).toEqual(79769);
expect(estimate.usingBaseFeeMutez).toEqual(519);
expect(estimate.consumedMilligas).toEqual(1766766);
expect(estimate.consumedMilligas).toEqual(1766852);
});

it('Verify .estimate.transfer for multiple internal originations', async () => {
const tx = contract.methods.do(originate2()).toTransferParams();
const estimate = await LowAmountTez.estimate.transfer(tx);
expect(estimate.gasLimit).toEqual(2392);
expect(estimate.gasLimit).toEqual(2393);
expect(estimate.storageLimit).toEqual(634);
expect(estimate.suggestedFeeMutez).toEqual(737);
expect(estimate.burnFeeMutez).toEqual(158500);
expect(estimate.minimalFeeMutez).toEqual(637);
expect(estimate.totalCost).toEqual(159137);
expect(estimate.usingBaseFeeMutez).toEqual(637);
expect(estimate.consumedMilligas).toEqual(2291919);
expect(estimate.consumedMilligas).toEqual(2292005);
// Do the actual operation
const op2 = await contract.methods.do(originate2()).send();
await op2.confirmation();
Expand Down

0 comments on commit fc646c5

Please sign in to comment.