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

Method getException

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

Source from the content-addressed store, hash-verified

17 }
18
19 getException() {
20 if (Array.isArray(this.params.value)) {
21 this.params.value = `[${this.params.value.join(', ')}]`
22 }
23
24 const err = new AssertionFailedError(this.params, "{{customMessage}}expected {{subject}} '{{value}}' {{type}}")
25
26 err.cliMessage = () => {
27 const msg = err.template.replace('{{value}}', output.colors.bold('{{value}}')).replace('{{subject}}', output.colors.bold('{{subject}}'))
28 return template(msg, this.params)
29 }
30 return err
31 }
32
33 addAssertParams() {
34 this.params.value = this.params.actual = arguments[0]

Callers

nothing calls this directly

Calls 1

templateFunction · 0.90

Tested by

no test coverage detected