Unit tests for a single JavaScript function
You can use array.map to create errs instead of creating an array and pushing to it.

const errs = response.data.map(entry =&gt; `options. ${entry.dataField}`)


With that out of the way, there's only two things that can happen with this code:


No errors emitted, app goes to top, processing is false.
Error emitted, app goes to top, processing is false.


Suggesting you create 2 tests, one for each branch and testing all 3 things. The function is small enough, there's no need to get too complicated.