MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / getException

Method getException

lib/assert/equal.js:18–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 1

templateFunction · 0.90

Tested by

no test coverage detected