@mt-testutils/expect-snapshot
v1.0.5
Published
Testing utility function to assert that a rendered React component matches a Jest snapshot
Downloads
989
Readme
expect-snapshot
This is a convencience function for rendering a React component and asserting that it matches a Jest snapshot.
Installation
npm install --save-dev @mt-testutils/expect-snapshot
Usage
import MyReactComponent from './MyReactComponent';
import expectSnapshot from '@mt-testutils/expect-snapshot';
describe('My react component', () =>
it('renders correctly', () => expectSnapshot(<MyComponent />)
);
Change Log
- See CHANGELOG.md
Contribution Guidelines
- See CONTRIBUTING.md
License
Copyright © 2018 mobile.de GmbH