Skip to content

Commit 3cfb7d5

Browse files
committed
test: Mock cozy-dataproxy-lib
1 parent dff4f89 commit 3cfb7d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/jestLib/setup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import '@testing-library/jest-dom'
2+
import React from 'react'
23

34
import log from 'cozy-logger'
45

@@ -28,3 +29,11 @@ console.warn = function (msg, msg2) {
2829
}
2930
return originalWarn.apply(this, arguments)
3031
}
32+
33+
jest.mock('cozy-dataproxy-lib', () => ({
34+
DataProxyProvider: ({ children }) => children,
35+
SearchDialog: () => <div>SearchDialog</div>,
36+
AssistantDialog: () => <div>AssistantDialog</div>,
37+
AssistantDesktop: () => <div>AssistantDesktop</div>,
38+
AssistantMobile: () => <div>AssistantMobile</div>
39+
}))

0 commit comments

Comments
 (0)