Write Test
When you create a processor through the command line, it will automatically generate a basic jest test for you.
It simply starts the processor and checks if there is any basic error that failed the processor declaration.
To check the logic of your handler function, we can use testLog
, testBlock
, testTrace
, to send events to your processor. In the code we generated for your contract, there are also some test utils that help you generate mocked data. Below is a test example that mocks a transfer event, sends it to the processor, and verifies the result :
Last updated