Class AssertionState
Constructors
constructor
- new
Assertion (): AssertionStateState Returns AssertionState
Accessors
assertionCount
- get assertionCount(): undefined | number
Get the number that through
expect.assertionsapi set.Returns undefined | number
the number that through
expect.assertionsapi set.
assertionTriggeredCount
- get assertionTriggeredCount(): number
Get a certain number that assertions were called before.
Returns number
return a certain number that assertions were called before.
Methods
checkAssertionCountSatisfied
- check
Assertion (): booleanCount Satisfied Check Assertion called state, if
#state.assertionCountis set to a number value, but#state.assertionTriggeredCountis less then it, then should throw an assertion error.Returns boolean
a boolean value, that the test suite is satisfied with the check. If not, it should throw an AssertionError.
checkAssertionErrorState
- check
Assertion (): booleanError State Check Assertion internal state, if
#state.assertionCheckis set true, but#state.assertionTriggeredis still false, then should throw an Assertion Error.Returns boolean
a boolean value, that the test suite is satisfied with the check. If not, it should throw an AssertionError.
Check the test suite internal state
Example: Usage