| 65 | return { message, pass: true }; |
| 66 | }, |
| 67 | toFailRequire( |
| 68 | transaction: Debuggable, |
| 69 | ) { |
| 70 | try { |
| 71 | transaction.debug(); |
| 72 | const message = (): string => 'Contract function did not fail a require statement.'; |
| 73 | return { message, pass: false }; |
| 74 | } catch (transactionError: any) { |
| 75 | const receivedText = `Received string: ${this.utils.printReceived(transactionError?.message ?? '')}`; |
| 76 | const message = (): string => `Contract function failed a require statement.\n${receivedText}`; |
| 77 | return { message, pass: true }; |
| 78 | } |
| 79 | }, |
| 80 | toFailRequireWith( |
| 81 | transaction: Debuggable, |
| 82 | match: RegExp | string, |