import { ReactNode } from 'react' ; import { ThemeProvider } from 'styled-components' ; import { mount , shallow } from 'enzyme' ; import theme from '../../views/themes/default' ; export function mountWithTheme ( Component ) { return mount < ReactNode > ( < ThemeProvider theme = { theme } > { Component } < /ThemeProvider>); } export function shallowWithTheme ( Component ) { return shallow < ReactNode > ( < ThemeProvider theme = { theme } > { Component } < /ThemeProvider>); }