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,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,
|
||||
|
||||
Reference in New Issue
Block a user