Closed OlaStenberg closed 2 years ago
Thanks for the bug report. I just released a new matchstick-as version (0.4.2) that fixes this problem.
Note 1: if you just update the package.json
file to point to version 0.4.2
of matchstick-as but have no changes in the test file you will need to run the following command the first time: graph test -- -r
to force the test wasm binaries to recompile
Note 2: I see that you are manually assigning every field from the mock event to the event of the type you need, that can be done more easily using changetype
like in here
Note 2: I see that you are manually assigning every field from the mock event to the event of the type you need, that can be done more easily using
changetype
like in here
Thanks, yeah I've used that in other subgraphs, but on this one I am working currently I was seeing syntax error, so I just did a quick workaround!
Thanks for the quick fix :-)
When I create two mock events with
newMockEvent()
and change e.g. the block timestamp, it changes on both of them. See screenshots below:I expect the
auctionEvent.block.timestamp
to still be 1 after changingbidEvent.event.timestamp
, seems it doesn't matter that I've created two separate mocks, seems to reference to the valueMy current workaround is to set the second events timestamp after the first one has been used, but I'd prefer to do all my setup in the beginning of the test