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,6 +1,6 @@
const should = require('chai').should();
const inLogs = async (logs, eventName, eventArgs = {}) => {
async function inLogs (logs, eventName, eventArgs = {}) {
const event = logs.find(e => e.event === eventName);
should.exist(event);
for (const [k, v] of Object.entries(eventArgs)) {
@ -8,12 +8,12 @@ const inLogs = async (logs, eventName, eventArgs = {}) => {
event.args[k].should.eq(v);
}
return event;
};
}
const inTransaction = async (tx, eventName, eventArgs = {}) => {
async function inTransaction (tx, eventName, eventArgs = {}) {
const { logs } = await tx;
return inLogs(logs, eventName, eventArgs);
};
}
module.exports = {
inLogs,