Do you want to request a feature or report a bug?
Bug in new feature that I created :(
What is the current behavior?
If a jest mock function throws an error, the .mock.returnValues array is not updated with an entry for that call to the mock. This causes the returnValues array to become out of sync with all other parallel arrays in the structure (calls, instances, etc).
Original new feature ticket: #5738
Original new feature PR: #5752
If the current behavior is a bug, please provide the steps to reproduce
Should be obvious. I'll add a new unit test to reproduce it before fixing it.
What is the expected behavior?
The the parallel arrays in the mock function's mock structure should always have matching lengths. When a mock function implementation throws an error, a value of undefined should be pushed onto the mock.returnValues array.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Irrelevant
Do you want to request a feature or report a bug?
Bug in new feature that I created :(
What is the current behavior?
If a jest mock function throws an error, the
.mock.returnValuesarray is not updated with an entry for that call to the mock. This causes thereturnValuesarray to become out of sync with all other parallel arrays in the structure (calls,instances, etc).Original new feature ticket: #5738
Original new feature PR: #5752
If the current behavior is a bug, please provide the steps to reproduce
Should be obvious. I'll add a new unit test to reproduce it before fixing it.
What is the expected behavior?
The the parallel arrays in the mock function's
mockstructure should always have matching lengths. When a mock function implementation throws an error, a value ofundefinedshould be pushed onto themock.returnValuesarray.Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Irrelevant