Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oieduardorabelo/jest-complex-mocks-examples

Using Jest mock's in complex HOC's like react-redux/connect() and react-intl
https://github.com/oieduardorabelo/jest-complex-mocks-examples

Last synced: 13 days ago
JSON representation

Using Jest mock's in complex HOC's like react-redux/connect() and react-intl

Awesome Lists containing this project

README

        

# Jest complex mocks

This repository have basic examples of using Jest mock's functions in complex HOC.

Here, we're mocking:

- `react-redux` - Component using `connect()`
- `react-intl` - Components using `` HOC and `injectIntl`
- `react-router-dom` - Example of testing components with `withRouter`

Making component test simple and easy again!

Example of: https://medium.com/@oieduardorabelo/testando-com-jest-15-dicas-para-mudar-seu-dia-17935520511e