Skip to content

Fix delegation ordering in token burn tests - #189

Open
mswilkison wants to merge 1 commit into
mainfrom
codex/111-await-delegation
Open

mswilkison wants to merge 1 commit into
mainfrom
codex/111-await-delegation

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

The shared burn-test setup started delegation without awaiting it, allowing burn or burnFrom to execute before voting power was delegated. Await both delegation calls so the existing event assertions observe the intended ordering.

Closes #111.

Validation: all 106 token tests pass on the existing Hardhat 2.10 / ethers 5 stack. A temporary timing harness delayed delegation submission by 100 ms: all four affected event tests failed with the original code and all four passed with this fix. Modified-file ESLint, Prettier, and git diff --check pass. Gas reporting was disabled locally because its reporter requires a listening socket in the sandbox; the contract tests ran on the in-memory Hardhat network.

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.

Unit test failing with Expected event "DelegateVotesChanged" to be emitted, but it wasn't

1 participant