aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-23 03:47:37 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:39:42 +0800
commit1cc9d9c0713a56b59717498fcae6dc2720ca4fb0 (patch)
treeeb20715294306fc61f77ecacaecc85c6d1144165 /packages/contracts/src/utils
parent72fb8460e90237fb7879fc47e95d84b6aa54911b (diff)
downloaddexon-0x-contracts-1cc9d9c0713a56b59717498fcae6dc2720ca4fb0.tar.gz
dexon-0x-contracts-1cc9d9c0713a56b59717498fcae6dc2720ca4fb0.tar.zst
dexon-0x-contracts-1cc9d9c0713a56b59717498fcae6dc2720ca4fb0.zip
Replace constant.REVERT test assertions with expectRevertOrAlwaysFailingTransaction
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r--packages/contracts/src/utils/assertions.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/contracts/src/utils/assertions.ts b/packages/contracts/src/utils/assertions.ts
index 72c2734d8..e3f31bf89 100644
--- a/packages/contracts/src/utils/assertions.ts
+++ b/packages/contracts/src/utils/assertions.ts
@@ -7,7 +7,7 @@ const expect = chai.expect;
// throws if the given promise does not reject with one of two expected error
// messages.
-export const expectRevertOrAlwaysFailingTransaction = <T>(p: Promise<T>) => {
+export function expectRevertOrAlwaysFailingTransaction<T>(p: Promise<T>): PromiseLike<void> {
return expect(p)
.to.be.rejected()
.then(e => {
@@ -17,4 +17,4 @@ export const expectRevertOrAlwaysFailingTransaction = <T>(p: Promise<T>) => {
_.includes(err.message, constants.ALWAYS_FAILING_TRANSACTION),
);
});
-};
+}