Remove Babel (#1074)

* Test helpers no longer rely on Babel.

* Behaviours are no longer imported.

* Removed Babel dependency.

* Fixed linter errors.
This commit is contained in:
Nicolás Venturo
2018-07-18 19:37:16 -03:00
committed by GitHub
parent 99e4b081dc
commit cea2a85a42
86 changed files with 308 additions and 252 deletions

View File

@ -1,5 +1,5 @@
import shouldBehaveLikeEscrow from './Escrow.behaviour';
import EVMRevert from '../helpers/EVMRevert';
const { shouldBehaveLikeEscrow } = require('./Escrow.behaviour');
const { EVMRevert } = require('../helpers/EVMRevert');
const BigNumber = web3.BigNumber;

View File

@ -1,6 +1,6 @@
import expectEvent from '../helpers/expectEvent';
import EVMRevert from '../helpers/EVMRevert';
import { ethGetBalance } from '../helpers/web3';
const expectEvent = require('../helpers/expectEvent');
const { EVMRevert } = require('../helpers/EVMRevert');
const { ethGetBalance } = require('../helpers/web3');
const BigNumber = web3.BigNumber;
@ -8,7 +8,7 @@ require('chai')
.use(require('chai-bignumber')(BigNumber))
.should();
export default function (owner, [payee1, payee2]) {
function shouldBehaveLikeEscrow (owner, [payee1, payee2]) {
const amount = web3.toWei(42.0, 'ether');
describe('as an escrow', function () {
@ -96,4 +96,8 @@ export default function (owner, [payee1, payee2]) {
});
});
});
}
module.exports = {
shouldBehaveLikeEscrow,
};

View File

@ -1,4 +1,4 @@
import shouldBehaveLikeEscrow from './Escrow.behaviour';
const { shouldBehaveLikeEscrow } = require('./Escrow.behaviour');
const Escrow = artifacts.require('Escrow');

View File

@ -1,4 +1,4 @@
import { ethGetBalance } from '../helpers/web3';
const { ethGetBalance } = require('../helpers/web3');
const BigNumber = web3.BigNumber;

View File

@ -1,6 +1,6 @@
import EVMRevert from '../helpers/EVMRevert';
import expectEvent from '../helpers/expectEvent';
import { ethGetBalance } from '../helpers/web3';
const { EVMRevert } = require('../helpers/EVMRevert');
const expectEvent = require('../helpers/expectEvent');
const { ethGetBalance } = require('../helpers/web3');
const BigNumber = web3.BigNumber;

View File

@ -1,4 +1,4 @@
import { ethGetBalance, ethSendTransaction } from '../helpers/web3';
const { ethGetBalance, ethSendTransaction } = require('../helpers/web3');
const BigNumber = web3.BigNumber;