Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 659 Bytes

File metadata and controls

30 lines (17 loc) · 659 Bytes

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

Contribution Guidelines

License

MIT licensed

Copyright © 2018 mobile.de GmbH