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 dff4f89 commit 3cfb7d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/jestLib/setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import '@testing-library/jest-dom'
import React from 'react'

import log from 'cozy-logger'

Expand Down Expand Up @@ -28,3 +29,11 @@ console.warn = function (msg, msg2) {
}
return originalWarn.apply(this, arguments)
}

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

0 comments on commit 3cfb7d5

Please sign in to comment.