Created
January 6, 2021 07:16
-
-
Save JimmyLv/b824bc348c9d38299dbdfc8d26639bc6 to your computer and use it in GitHub Desktop.
Created with Copy to Gist
This file contains hidden or 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
| const user = { | |
| id: 1, | |
| name: 'Hugo', | |
| friends: [3, 5, 22] | |
| }; | |
| test('user 3 should be a friend of user', () => { | |
| expect(user).toEqual( | |
| expect.objectContaining({ | |
| friends: expect.arrayContaining([3]) | |
| }) | |
| ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment