You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
323 B
16 lines
323 B
const should = require('chai')
|
|
.should();
|
|
|
|
async function assertRevert (promise) {
|
|
try {
|
|
await promise;
|
|
} catch (error) {
|
|
error.message.should.include('revert', `Expected "revert", got ${error} instead`);
|
|
return;
|
|
}
|
|
should.fail('Expected revert not received');
|
|
}
|
|
|
|
module.exports = {
|
|
assertRevert,
|
|
};
|
|
|