Skip to content

Commit

Permalink
chore(sanity): update createWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
RitaDias committed Jul 8, 2024
1 parent 512221e commit 6f55590
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {beforeEach, describe, expect, it, jest} from '@jest/globals'
import {fireEvent, render, screen} from '@testing-library/react'
import {type BundleDocument} from 'sanity'

import {createWrapper} from '../../../util/__tests__/createWrapper'
import {createWrapper} from '../../../util/tests/createWrapper'
import {BundleForm} from '../BundleForm'

jest.mock('sanity', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {beforeEach, describe, expect, it, jest} from '@jest/globals'
import {fireEvent, render, screen} from '@testing-library/react'
import {type BundleDocument} from 'sanity'

import {createWrapper} from '../../../util/__tests__/createWrapper'
import {createWrapper} from '../../../util/tests/createWrapper'
import {BundleIconEditorPicker} from '../BundleIconEditorPicker'

describe('BundleIconEditorPicker', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/src/core/bundles/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './components'
export * from './hooks'
export * from './util/__tests__/createWrapper'
export * from './util/const'
export * from './util/dummyGetters'
export * from './util/tests/createWrapper'
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {studioTheme, ThemeProvider} from '@sanity/ui'
import {type ReactNode} from 'react'

import {createTestProvider} from '../../../../../test/testUtils/TestProvider'
import {releasesUsEnglishLocaleBundle} from '../../../releases/i18n'

export const createWrapper = async () => {
const TestProvider = await createTestProvider({
resources: [releasesUsEnglishLocaleBundle],
})
const TestProvider = await createTestProvider()
return function Wrapper({children}: {children: ReactNode}): JSX.Element {
return (
<ThemeProvider theme={studioTheme}>
Expand Down

0 comments on commit 6f55590

Please sign in to comment.