added a test helper with common constants (#1400)
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359)"
This reverts commit a6889776f4.
* updates
* fixes #1206
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
const { assertRevert } = require('../../helpers/assertRevert');
|
||||
const expectEvent = require('../../helpers/expectEvent');
|
||||
const { ZERO_ADDRESS } = require('../../helpers/constants');
|
||||
|
||||
const ERC20Mock = artifacts.require('ERC20Mock');
|
||||
|
||||
@ -10,8 +11,6 @@ require('chai')
|
||||
.should();
|
||||
|
||||
contract('ERC20', function ([_, owner, recipient, anotherAccount]) {
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
beforeEach(async function () {
|
||||
this.token = await ERC20Mock.new(owner, 100);
|
||||
});
|
||||
|
||||
@ -2,6 +2,7 @@ const { expectThrow } = require('../../helpers/expectThrow');
|
||||
const { EVMRevert } = require('../../helpers/EVMRevert');
|
||||
const time = require('../../helpers/time');
|
||||
const { ethGetBlock } = require('../../helpers/web3');
|
||||
const { ZERO_ADDRESS } = require('../../helpers/constants');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
@ -14,7 +15,6 @@ const TokenVesting = artifacts.require('TokenVesting');
|
||||
|
||||
contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
const amount = new BigNumber(1000);
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
beforeEach(async function () {
|
||||
// +1 minute so it starts after contract instantiation
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
const { assertRevert } = require('../../../helpers/assertRevert');
|
||||
const expectEvent = require('../../../helpers/expectEvent');
|
||||
const { ZERO_ADDRESS } = require('../../../helpers/constants');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
require('chai')
|
||||
.use(require('chai-bignumber')(BigNumber))
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const { assertRevert } = require('../../../helpers/assertRevert');
|
||||
const expectEvent = require('../../../helpers/expectEvent');
|
||||
const { ZERO_ADDRESS } = require('../../../helpers/constants');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
@ -8,8 +9,6 @@ require('chai')
|
||||
.should();
|
||||
|
||||
function shouldBehaveLikeERC20Mintable (minter, [anyone]) {
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
describe('as a mintable token', function () {
|
||||
describe('mint', function () {
|
||||
const amount = 100;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
const expectEvent = require('../../helpers/expectEvent');
|
||||
const { shouldSupportInterfaces } = require('../../introspection/SupportsInterface.behavior');
|
||||
const { assertRevert } = require('../../helpers/assertRevert');
|
||||
const { ZERO_ADDRESS } = require('../../helpers/constants');
|
||||
const { decodeLogs } = require('../../helpers/decodeLogs');
|
||||
const { sendTransaction } = require('../../helpers/sendTransaction');
|
||||
|
||||
@ -19,7 +20,6 @@ function shouldBehaveLikeERC721 (
|
||||
const firstTokenId = 1;
|
||||
const secondTokenId = 2;
|
||||
const unknownTokenId = 3;
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
const RECEIVER_MAGIC_VALUE = '0x150b7a02';
|
||||
|
||||
describe('like an ERC721', function () {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const { assertRevert } = require('../../helpers/assertRevert');
|
||||
const expectEvent = require('../../helpers/expectEvent');
|
||||
const { ZERO_ADDRESS } = require('../../helpers/constants');
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
require('chai')
|
||||
@ -15,7 +16,6 @@ function shouldBehaveLikeMintAndBurnERC721 (
|
||||
const secondTokenId = 2;
|
||||
const thirdTokenId = 3;
|
||||
const unknownTokenId = 4;
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
const MOCK_URI = 'https://example.com';
|
||||
|
||||
describe('like a mintable and burnable ERC721', function () {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const { assertRevert } = require('../../helpers/assertRevert');
|
||||
const { sendTransaction } = require('../../helpers/sendTransaction');
|
||||
const { ZERO_ADDRESS } = require('../../helpers/constants');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
@ -11,7 +12,6 @@ function shouldBehaveLikeERC721PausedToken (owner, [recipient, operator]) {
|
||||
const firstTokenId = 1;
|
||||
const mintedTokens = 1;
|
||||
const mockData = '0x42';
|
||||
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||
|
||||
describe('like a paused ERC721', function () {
|
||||
beforeEach(async function () {
|
||||
|
||||
Reference in New Issue
Block a user