express-tdd
express-tdd copied to clipboard
refactor: replaced toHaveBeenCalledWith with toBeCalledWith
According to the Jest's docs toHaveBeenCalledWith goes under the alias toBeCalledWith: https://jestjs.io/docs/en/expect#tohavebeencalledwitharg1-arg2-.
This might be the best approach for clarification and consistency.
Hey thanks for the PR @MitchelSt ! Unfortunately I think it would not be consistent for the students if I use toHaveBeenCalledWith in the videos and they see toBeCalledWith in the code. Although I might be using the other one in future to save a few keystrokes :)!