Reorganize tests and add library folder

pull/688/head
AugustoL 7 years ago
parent b0522b9c58
commit 4fbd44fd40
  1. 6
      test/examples/SimpleToken.test.js
  2. 6
      test/library/ECRecovery.test.js
  3. 2
      test/library/Math.test.js
  4. 4
      test/library/MerkleProof.test.js
  5. 2
      test/token/erc/DetailedERC20.test.js
  6. 6
      test/token/erc/ERC827Token.js
  7. 4
      test/token/erc/SafeERC20.test.js

@ -1,5 +1,5 @@
import decodeLogs from './helpers/decodeLogs'; import decodeLogs from '../helpers/decodeLogs';
const SimpleToken = artifacts.require('examples/SimpleToken.sol'); const SimpleToken = artifacts.require('SimpleToken.sol');
contract('SimpleToken', accounts => { contract('SimpleToken', accounts => {
let token; let token;
@ -23,7 +23,7 @@ contract('SimpleToken', accounts => {
const decimals = await token.decimals(); const decimals = await token.decimals();
assert(decimals.eq(18)); assert(decimals.eq(18));
}); });
it('assigns the initial total supply to the creator', async function () { it('assigns the initial total supply to the creator', async function () {
const totalSupply = await token.totalSupply(); const totalSupply = await token.totalSupply();
const creatorBalance = await token.balanceOf(creator); const creatorBalance = await token.balanceOf(creator);

@ -1,7 +1,7 @@
var ECRecoveryMock = artifacts.require('../contracts/mocks/ECRecoveryMock.sol'); var ECRecoveryMock = artifacts.require('ECRecoveryMock.sol');
var ECRecoveryLib = artifacts.require('../contracts/ECRecovery.sol'); var ECRecoveryLib = artifacts.require('ECRecovery.sol');
var hashMessage = require('./helpers/hashMessage.js'); var hashMessage = require('../helpers/hashMessage.js');
contract('ECRecovery', function (accounts) { contract('ECRecovery', function (accounts) {
let ecrecovery; let ecrecovery;

@ -1,4 +1,4 @@
var MathMock = artifacts.require('./mocks/MathMock.sol'); var MathMock = artifacts.require('../mocks/MathMock.sol');
contract('Math', function (accounts) { contract('Math', function (accounts) {
let math; let math;

@ -1,8 +1,8 @@
import MerkleTree from './helpers/merkleTree.js'; import MerkleTree from '../helpers/merkleTree.js';
import { sha3, bufferToHex } from 'ethereumjs-util'; import { sha3, bufferToHex } from 'ethereumjs-util';
var MerkleProof = artifacts.require('./MerkleProof.sol'); var MerkleProof = artifacts.require('MerkleProof.sol');
contract('MerkleProof', function (accounts) { contract('MerkleProof', function (accounts) {
let merkleProof; let merkleProof;

@ -5,7 +5,7 @@ require('chai')
.use(require('chai-bignumber')(BigNumber)) .use(require('chai-bignumber')(BigNumber))
.should(); .should();
const DetailedERC20Mock = artifacts.require('mocks/DetailedERC20Mock.sol'); const DetailedERC20Mock = artifacts.require('DetailedERC20Mock.sol');
contract('DetailedERC20', accounts => { contract('DetailedERC20', accounts => {
let detailedERC20 = null; let detailedERC20 = null;

@ -1,7 +1,7 @@
import EVMRevert from './helpers/EVMRevert'; import EVMRevert from '../../helpers/EVMRevert';
var Message = artifacts.require('./mock/MessageHelper.sol'); var Message = artifacts.require('MessageHelper.sol');
var ERC827TokenMock = artifacts.require('./mock/ERC827TokenMock.sol'); var ERC827TokenMock = artifacts.require('ERC827TokenMock.sol');
var BigNumber = web3.BigNumber; var BigNumber = web3.BigNumber;
var _ = require('lodash'); var _ = require('lodash');

@ -1,10 +1,10 @@
import EVMThrow from '../helpers/EVMThrow'; import EVMThrow from '../../helpers/EVMThrow';
require('chai') require('chai')
.use(require('chai-as-promised')) .use(require('chai-as-promised'))
.should(); .should();
const SafeERC20Helper = artifacts.require('mocks/SafeERC20Helper.sol'); const SafeERC20Helper = artifacts.require('SafeERC20Helper.sol');
contract('SafeERC20', function () { contract('SafeERC20', function () {
beforeEach(async function () { beforeEach(async function () {
Loading…
Cancel
Save