Last active
February 22, 2017 11:01
-
-
Save ricca509/4411eb0ce0fd4696369b50867d3d0bf8 to your computer and use it in GitHub Desktop.
snapshot-serialisable.js
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
describe('Snapshot tests', () => { | |
it('work with objects', () => { | |
expect({ | |
a: 234, | |
b: 'test', | |
c: null, | |
d: undefined, | |
}).toMatchSnapshot(); | |
}); | |
it('work with strings', () => { | |
expect('This is a test').toMatchSnapshot(); | |
}); | |
it('work with arrays', () => { | |
expect(['a', 5, () => 3]).toMatchSnapshot(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment