Skip to content

refactor: replaced toHaveBeenCalledWith with toBeCalledWith#1

Open
MitchelSt wants to merge 1 commit intoHyllesen:08_GetTodoByIdfrom
MitchelSt:patch-1
Open

refactor: replaced toHaveBeenCalledWith with toBeCalledWith#1
MitchelSt wants to merge 1 commit intoHyllesen:08_GetTodoByIdfrom
MitchelSt:patch-1

Conversation

@MitchelSt
Copy link
Copy Markdown

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.

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.
@Hyllesen
Copy link
Copy Markdown
Owner

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 :)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants