Created
February 8, 2019 10:08
-
-
Save takethefake/2fd795ab009490696f9b1c78ca5885d3 to your computer and use it in GitHub Desktop.
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
it('will check the matchers and pass', () => { | |
const user = { | |
createdAt: new Date(), | |
id: Math.floor(Math.random() * 20), | |
name: 'LeBron James', | |
}; | |
expect(user).toMatchSnapshot({ | |
createdAt: expect.any(Date), | |
id: expect.any(Number), | |
}); | |
}); | |
// Snapshot | |
exports[`will check the matchers and pass 1`] = ` | |
Object { | |
"createdAt": Any<Date>, | |
"id": Any<Number>, | |
"name": "LeBron James", | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment