Skip to content

Commit

Permalink
test: Mock cozy-dataproxy-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
zatteo committed Dec 18, 2024
1 parent c15c634 commit b53265f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jestHelpers/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@ jest.mock('cozy-intent', () => ({
useWebviewIntent: jest.fn()
}))

jest.mock('cozy-dataproxy-lib', () => ({
DataProxyProvider: ({ children }) => children,
SearchDialog: () => <div>SearchDialog</div>,
AssistantDialog: () => <div>AssistantDialog</div>,
AssistantDesktop: () => <div>AssistantDesktop</div>
}))

// see https://github.com/jsdom/jsdom/issues/1695
window.HTMLElement.prototype.scroll = function () {}

0 comments on commit b53265f

Please sign in to comment.