sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

fix(jest): :pencil2: stick to jest expect convention

Open cadesalaberry opened this issue 5 years ago • 1 comments

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 avatar Mar 22 '20 13:03 cadesalaberry

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.

jayair avatar Mar 30 '20 21:03 jayair