feat: update event names for OZ standards and test them
This commit is contained in:
16
test/helpers/expectEvent.js
Normal file
16
test/helpers/expectEvent.js
Normal file
@ -0,0 +1,16 @@
|
||||
const assert = require('chai').assert;
|
||||
|
||||
const inLogs = async (logs, eventName) => {
|
||||
const event = logs.find(e => e.event === eventName);
|
||||
assert.exists(event);
|
||||
};
|
||||
|
||||
const inTransaction = async (tx, eventName) => {
|
||||
const { logs } = await tx;
|
||||
return inLogs(logs, eventName);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
inLogs,
|
||||
inTransaction,
|
||||
};
|
||||
Reference in New Issue
Block a user