Skip to content

Add tests for state overrides#146

Open
0xOmarA wants to merge 4 commits into
mainfrom
0xOmarA/add-tests-for-state-overrides
Open

Add tests for state overrides#146
0xOmarA wants to merge 4 commits into
mainfrom
0xOmarA/add-tests-for-state-overrides

Conversation

@0xOmarA

@0xOmarA 0xOmarA commented Mar 30, 2026

Copy link
Copy Markdown

No description provided.

expect(result).toBeDefined()
})

Deno.test('state_override: balance zero prevents transfer', opts, async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test seems unfalsifiable. The try catches all including the sentinel throw new Error('Expected to fail') when the call succeeds

expect(name).toEqual('Hello world')
})

Deno.test('state_override: storage on EOA fails', opts, async () => {

@0xRVE 0xRVE Mar 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test seems unfalsifiable. The try catches all including the sentinel throw new Error('Expected to fail') when the call succeeds

expect(value).toEqual(999n)
})

Deno.test('state_override: state full replacement', opts, async () => {

@0xRVE 0xRVE Mar 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that this test performs the same checks as state_override: stateDiff patches slot but it should be testing more fields?

i.e. value and name fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants