sarahsporck / Migration-Test-Repository

This repository is used to test the ticket migration from jira to github
0 stars 1 forks source link

IGAPP-896: Create a static mock for styled-components #3548

Closed jira-to-github-migrator-test[bot] closed 11 months ago

jira-to-github-migrator-test[bot] commented 11 months ago

sarahsporck - 24.1.2022, 14:09:28

Create a static mock for  styled components like this:

jest.mock('styled-components', () => ({ 
    ...jest.requireActual('styled-components'), 
    useTheme: () =>mockTheme 
}))

  Then replace all occurences of this by jest.mock('styled-components')

Environment: - Linked issues: