Type Declaration
toHaveNavigatedTo()
tap.nav.push was called with exactly that path.
Parameters
received
unknown
path
string
Returns
MatcherResult
toHaveRunAction()
tap.actions.run was called with that action, and with input
deep-equal to input when one is given.
Parameters
received
unknown
actionId
string
input?
unknown
Returns
MatcherResult
toHaveStored()
Parameters
received
unknown
collection
string
document
unknown
Returns
MatcherResult
toHaveToasted()
Parameters
received
unknown
expected
string | RegExp
Returns
MatcherResult
Remarks
Each takes the mockrenderWithTap returns, so the assertion is
expect(mock).toHaveToasted(…) rather than expect(component); anything else
throws a TapError carrying TAP_TEST_TARGET_INVALID. A failure names every
call that was recorded, so a wrong path or message reads without a debugger. The
vitest and jest presets register these, and both declare the four on the runner’s
own Matchers interface, so expect(mock).toHaveToasted typechecks once the
preset is in the setup files.