How to use the @openzeppelin/test-helpers.expectEvent.inLogs function in @openzeppelin/test-helpers

To help you get started, we’ve selected a few @openzeppelin/test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('emits a HardDepositDecreaseTimeoutChanged event', function() {
    expectEvent.inLogs(this.logs, 'HardDepositDecreaseTimeoutChanged', {
      beneficiary,
      decreaseTimeout
    })
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('should emit a transfer event', async function() {
    expectEvent.inLogs(this.logs, "Transfer", {
      from: from,
      to: this.ERC20SimpleSwap.address,
      value: amount
    })
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('should only emit a chequeBounced event when insufficient funds', function() {
    if(this.totalPayout.lt(cumulativePayout.sub(this.preconditions.paidOut))) {
      expectEvent.inLogs(this.logs, "ChequeBounced", {})
    } else {
      const events = this.logs.filter(e => e.event === 'ChequeBounced');
      expect(events.length > 0).to.equal(false, `There is a ChequeBounced event`)
    }
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('should emit a ChequeCashed event', function() {
    expectEvent.inLogs(this.logs, "ChequeCashed", {
      beneficiary,
      recipient: recipient,
      caller: from,
      totalPayout: this.totalPayout,
      cumulativePayout,
      callerPayout,
    })
  })
  it('should only emit a chequeBounced event when insufficient funds', function() {
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('should emit a HardDepositDecreasePrepared event', function() {
    expectEvent.inLogs(this.logs, 'HardDepositDecreasePrepared', {
      beneficiary,
      decreaseAmount
    })
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('emits a hardDepositAmountChanged event', function() {
    expectEvent.inLogs(this.logs, 'HardDepositAmountChanged', {
      beneficiary,
      amount
    })
  })
}