Skip to content

Commit

Permalink
ContractStorageRead constant check
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 1, 2024
1 parent 138bb11 commit 39f73f5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CONTRACT_STORAGE_READ_LENGTH } from '../constants.gen.js';
import { makeContractStorageRead } from '../tests/factories.js';
import { ContractStorageRead } from './contract_storage_read.js';

Expand All @@ -20,4 +21,9 @@ describe('ContractStorageRead', () => {
const res = ContractStorageRead.fromFields(fieldArray);
expect(res).toEqual(read);
});

it('number of fields matches constant', () => {
const fields = read.toFields();
expect(fields.length).toBe(CONTRACT_STORAGE_READ_LENGTH);
});
});

0 comments on commit 39f73f5

Please sign in to comment.