There is a part of my Solidity code:

event elo(address pAddress);
function test()
    emit elo(m_Registry);

And a chunk of my test:

const truffleAssert = require('truffle-assertions');
it("test", async()=>{
    let result = await (await ProxyBody.at(proxyImplementation.address)).test();
    truffleAssert.eventEmitted(result, 'elo', (ev) => {
        console.log("event data: " + ev.pAddress);
        return true;

When I'm doing a test it shows me: enter image description here

How can I fix it? I did: npm install -g truffle-assertions And later without -g parameter.

truffle-assertions exists in the node-modules directory.

  • 1
    Ok, problem fixed after reinstalling. – Radeg90 May 14 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.