Skip to content

Commit

Permalink
chore(test): remove @sanity/ui jest mock
Browse files Browse the repository at this point in the history
This doesn't seem to be needed anymore
  • Loading branch information
bjoerge authored and rexxars committed Feb 14, 2024
1 parent af6561e commit 66eaec5
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,4 @@ if (typeof window !== 'undefined') {
disconnect = jest.fn()
},
})

jest.mock('@sanity/ui', () => {
// causes `ResizeObserver` not found errors
const sanityUi = jest.requireActual('@sanity/ui')
const mockDomRect: DOMRectReadOnly = {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0,
x: 0,
y: 0,
toJSON: () => ({}),
}

return {...sanityUi, useElementRect: jest.fn(() => mockDomRect)}
})
}

0 comments on commit 66eaec5

Please sign in to comment.