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

Method assert

lib/assert.js:34–39  ·  view source on GitHub ↗

* Performs positive assertion. * Fails if comparator function with provided arguments returns false

()

Source from the content-addressed store, hash-verified

32 * Fails if comparator function with provided arguments returns false
33 */
34 assert() {
35 this.addAssertParams.apply(this, arguments)
36 const result = this.comparator.apply(this.params, arguments)
37 if (result) return // should increase global assertion counter
38 throw this.getFailedAssertion()
39 }
40
41 /**
42 * Performs negative assertion.

Callers 15

effects.jsFile · 0.80
expectElementFunction · 0.80
expectAllElementsFunction · 0.80
seeInThisFileMethod · 0.80
seeFileContentsEqualMethod · 0.80
seeInPopupMethod · 0.80
seeInTitleMethod · 0.80
seeTitleEqualsMethod · 0.80
dontSeeElementMethod · 0.80
dontSeeElementInDOMMethod · 0.80
seeInCurrentUrlMethod · 0.80

Calls 1

getFailedAssertionMethod · 0.95

Tested by

no test coverage detected