Skip to content

expectEmit does not work when making a constant call #1214

@PaulRBerg

Description

@PaulRBerg

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (6130af7 2022-04-06T00:04:11.858449+00:00)

What command(s) is the bug in?

forge test

Operating System

macOS (M1)

Describe the bug

I created a repo for reproducing this bug:

https://github.com/paulrberg/foundry-expect-emit-bug

testEmitMyEvent_v1 passes, but testEmitMyEvent_v2 doesn't. The only different is the fact that v2 adds a constant call after the expectEmit call and the function that emits the event.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions