How to use the @openzeppelin/test-helpers.expectRevert 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('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.setCustomHardDepositDecreaseTimeout(
      toSubmit.beneficiary,
      toSubmit.decreaseTimeout,
      this.beneficiarySig,
      {from: from, value: value}), 
      revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.withdraw(
      amount,
      {from: from, value: value}), 
      revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.cashCheque(
      toSubmitFields.beneficiary, 
      toSubmitFields.recipient, 
      toSubmitFields.cumulativePayout, 
      this.beneficiarySig, 
      toSubmitFields.callerPayout,
      this.issuerSig,
      {from: from, value: value}), 
      revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.prepareDecreaseHardDeposit(
      beneficiary,
      decreaseAmount,
      {from: from, value: value}), 
      revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.increaseHardDeposit(
      beneficiary,
      amount,
      {from: from, value: value}), 
      revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.cashChequeBeneficiary(
      recipient,
      toSubmitCumulativePayout,
      this.issuerSig,
     {from: from, value: value}), 
     revertMessage
    )
  })
}
github ethersphere / swap-swear-and-swindle / test / ERC20SimpleSwap.should.js View on Github external
it('reverts', async function() {
    await expectRevert(this.ERC20SimpleSwap.decreaseHardDeposit(
      beneficiary,
      {from: from, value: value}), 
      revertMessage
    )
  })