Skip to content

Commit

Permalink
Update ThemeProvider imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanjc committed Nov 28, 2023
1 parent 38ec61d commit 37becf7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/components/test/Field.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import React from 'react'
import { renderJSON } from '@theme-ui/test-utils'
import { ThemeProvider } from 'theme-ui'
import { ThemeUIProvider } from 'theme-ui'

import { Field } from '..'

Expand All @@ -13,25 +13,25 @@ import { theme } from './__test-utils__'
describe('Field', () => {
test('renders', () => {
const json = renderJSON(
<ThemeProvider theme={theme}>
<ThemeUIProvider theme={theme}>
<Field />
</ThemeProvider>
</ThemeUIProvider>
)
expect(json).toMatchSnapshot()
})
test('renders with id prop', () => {
const json = renderJSON(
<ThemeProvider theme={theme}>
<ThemeUIProvider theme={theme}>
<Field id="test-field" />
</ThemeProvider>
</ThemeUIProvider>
)
expect(json).toMatchSnapshot()
})
test('containerSx and sx', () => {
const json = renderJSON(
<ThemeProvider theme={theme}>
<ThemeUIProvider theme={theme}>
<Field label="Name" sx={{ color: 'primary' }} containerSx={{ my: 4 }} />
</ThemeProvider>
</ThemeUIProvider>
)
expect(json).toMatchSnapshot()
})
Expand Down
4 changes: 2 additions & 2 deletions packages/components/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ describe('Divider', () => {
describe('Embed', () => {
test('renders with box system props', () => {
const json = renderJSON(
<ThemeProvider theme={theme}>
<ThemeUIProvider theme={theme}>
<Embed sx={{ mx: 'auto', py: 4 }} />
</ThemeProvider>
</ThemeUIProvider>
)
expect(json).toMatchSnapshot()
})
Expand Down

0 comments on commit 37becf7

Please sign in to comment.