UNPKG

solidity-cron

Version:

[![Build Status](https://travis-ci.com/Frontier-project/cron.svg?token=DJeMzxJJncp3nRaEUuxH&branch=master)](https://travis-ci.com/Frontier-project/cron) [![codecov](https://codecov.io/gh/Frontier-project/cron/branch/master/graph/badge.svg?token=BGbU5Q6IRV

14 lines (13 loc) 339 B
module.exports = { assertRevert: async (promise) => { try { await promise } catch (error) { const revertFound = error.message.search('revert') >= 0 assert(revertFound, `Expected "revert", got ${error} instead`) return } console.log('Im here') assert.fail('Expected revert not received') } }