Update docs
This commit is contained in:
@ -3,10 +3,10 @@ const { config } = require('hardhat');
|
||||
const optimizationsEnabled = config.solidity.compilers.some(c => c.settings.optimizer.enabled);
|
||||
|
||||
/** Revert handler that supports custom errors. */
|
||||
async function expectRevertCustomError (promise, reason) {
|
||||
async function expectRevertCustomError(promise, reason) {
|
||||
try {
|
||||
await promise;
|
||||
expect.fail('Expected promise to throw but it didn\'t');
|
||||
expect.fail("Expected promise to throw but it didn't");
|
||||
} catch (revert) {
|
||||
if (reason) {
|
||||
if (optimizationsEnabled) {
|
||||
@ -17,7 +17,7 @@ async function expectRevertCustomError (promise, reason) {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
expectRevertCustomError,
|
||||
|
||||
Reference in New Issue
Block a user