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:
@ -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;
|
||||
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import shouldBehaveLikeEscrow from './Escrow.behaviour';
|
||||
const { shouldBehaveLikeEscrow } = require('./Escrow.behaviour');
|
||||
|
||||
const Escrow = artifacts.require('Escrow');
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ethGetBalance } from '../helpers/web3';
|
||||
const { ethGetBalance } = require('../helpers/web3');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ethGetBalance, ethSendTransaction } from '../helpers/web3';
|
||||
const { ethGetBalance, ethSendTransaction } = require('../helpers/web3');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user