You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating my Node.js AWS SDK v2 codebase to v3.
I'm using jest as my testing framework, and sometimes I have a long test matrix that accepts the relevant Command used as a parameter. The test matrix also supports a scenario where the Command is irrelevant, and therefore is undefined.
When I run .not.toHaveReceivedCommandWith(undefined) the code crashes, as it expects a valid Command.
I wish I was able to just .not.toHaveReceivedAnyCommand to settle this specific use-case. It's also a common matcher pattern in other popular custom matchers, like jest-extended
I'm not that familiar with the jest matchers framework, but willing to contribute if this makes sense :)
The text was updated successfully, but these errors were encountered:
I'm migrating my Node.js AWS SDK v2 codebase to v3.
I'm using
jest
as my testing framework, and sometimes I have a long test matrix that accepts the relevantCommand
used as a parameter. The test matrix also supports a scenario where theCommand
is irrelevant, and therefore isundefined
.When I run
.not.toHaveReceivedCommandWith(undefined)
the code crashes, as it expects a validCommand
.I wish I was able to just
.not.toHaveReceivedAnyCommand
to settle this specific use-case. It's also a common matcher pattern in other popular custom matchers, likejest-extended
I'm not that familiar with the jest matchers framework, but willing to contribute if this makes sense :)
The text was updated successfully, but these errors were encountered: