MCPcopy
hub / github.com/codeceptjs/CodeceptJS / throws

Method throws

lib/mocha/scenarioConfig.js:20–23  ·  view source on GitHub ↗

* Declares that test throws error. * Can pass an Error object or regex matching expected message. * * @param {*} err * @returns {this}

(err)

Source from the content-addressed store, hash-verified

18 * @returns {this}
19 */
20 throws(err) {
21 this.test.throws = err
22 return this
23 }
24
25 /**
26 * Declares that test should fail.

Callers 4

ui_test.jsFile · 0.45
session_test.jsFile · 0.45
within_test.jsFile · 0.45
assertThrowsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected