Feeling a bit overloaded at the moment, so forgive me if this question seems too simple. I managed to accidentally write some code in Jest for testing a Vue application that actually works:
const updateMethod = wrapper.vm.updateMethod = jest.fn()
expect(updateVal).toHaveBeenCalledWith('methodArgument')
I'm drawing a blank right now - what do you call this type of assignment? My brain is fried and I can't seem to come up with a solution to refactor it.
Appreciate the help!