Created
October 25, 2017 00:38
-
-
Save guyellis/85248e69a0439d7c5e1d6d98579fe555 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I was not expecting this. I changed a test using Node's assert.deepEqual() to | |
// Jest's toEqual(). | |
// Node's deepEqual(): | |
assert.deepEqual(transformed, plant); | |
// passed! | |
// Jest's toEqual(): | |
expect(transformed).toEqual(plant); | |
// Fails: | |
- "coordinates": Array [ | |
- 1.11, | |
- 2.22, | |
- ], | |
+ "coordinates": Object { | |
+ "0": 1.11, | |
+ "1": 2.22, | |
+ }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I should have been using
deepStrictEqual
: nodejs/node#2657