This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move vouching and token contracts tests to subdir * Use babel presets * Move assert event helper to lib * Add TPL integration tests * Use non-zero attribute ID
- Loading branch information
1 parent
edbd20f
commit c5019dd
Showing
11 changed files
with
1,777 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function inLogs (logs, eventName, eventArgs = {}) { | ||
const event = logs.find(e => | ||
e.event === eventName && | ||
Object.entries(eventArgs).every(([k, v]) => e.args[k] === v)) | ||
|
||
assert(!!event, `Expected to find ${eventName} with ${eventArgs} in ${logs}`) | ||
return event | ||
} | ||
|
||
async function inTransaction (tx, eventName, eventArgs = {}) { | ||
const { logs } = await tx; | ||
return inLogs(logs, eventName, eventArgs); | ||
} | ||
|
||
export default { | ||
inLogs, | ||
inTransaction, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": "8.9" | ||
} | ||
}] | ||
], | ||
"plugins": ["transform-object-rest-spread"] | ||
} |
Oops, something went wrong.