()
| 16 | } |
| 17 | |
| 18 | getException() { |
| 19 | const params = this.params |
| 20 | params.jar = template(params.jar, params) |
| 21 | const err = new AssertionFailedError(params, '{{customMessage}}expected {{jar}} "{{expected}}" {{type}} "{{actual}}"') |
| 22 | err.showDiff = false |
| 23 | if (typeof err.cliMessage === 'function') { |
| 24 | err.message = err.cliMessage() |
| 25 | } |
| 26 | err.cliMessage = () => { |
| 27 | const msg = err.template.replace('{{jar}}', output.colors.bold('{{jar}}')) |
| 28 | return template(msg, this.params) |
| 29 | } |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | addAssertParams() { |
| 34 | this.params.expected = arguments[0] |
nothing calls this directly
no test coverage detected