Make react-test usable without styled-components
This commit is contained in:
parent
e86c8b9226
commit
12515eac74
@ -114,9 +114,15 @@ export class TestUtils {
|
|||||||
const component: TestContainer | null = await new Promise(resolve => {
|
const component: TestContainer | null = await new Promise(resolve => {
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<TestContainer ref={instance => resolve(instance)}>
|
<TestContainer ref={instance => resolve(instance)}>
|
||||||
<ThemeProvider theme={TestUtils.defaultTheme}>
|
{
|
||||||
{jsx}
|
TestUtils.defaultTheme
|
||||||
</ThemeProvider>
|
? (
|
||||||
|
<ThemeProvider theme={TestUtils.defaultTheme}>
|
||||||
|
{jsx}
|
||||||
|
</ThemeProvider>
|
||||||
|
)
|
||||||
|
: jsx
|
||||||
|
}
|
||||||
</TestContainer>,
|
</TestContainer>,
|
||||||
$div,
|
$div,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user