Skip to content

Conversation

cadesalaberry
Copy link
Contributor

https://jestjs.io/docs/en/expect#tobevalue

Use .toBe() to compare primitive values or to check referential identity of object instances.

.toEqual() is rather used to compare the content of an object.

actual and expected values were also the other way around; The reference value is supposed to used as a parameter of the toBe function rather than the expect function.

https://jestjs.io/docs/en/expect#tobevalue

> Use .toBe() to compare primitive values or to check referential identity of object instances.

`.toEqual()` is rather used to compare the content of an object.

actual and expected values were also the other way around; The reference value is supposed to used as a parameter of the `toBe` function rather than the `expect` function.
@cadesalaberry cadesalaberry changed the title fix(docs): ✏️ stick to jest expect convention fix(jest): ✏️ stick to jest expect convention Mar 28, 2020
@jayair
Copy link
Contributor

jayair commented Mar 30, 2020

Thank you. We'd need to update the code repos attached to this. I'll leave this open for now and update it once we update the guide.

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