From 3cfb7d548f955b977b5540046376c6eaebf07cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Wed, 18 Dec 2024 10:51:52 +0100 Subject: [PATCH] test: Mock cozy-dataproxy-lib --- test/jestLib/setup.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/jestLib/setup.js b/test/jestLib/setup.js index abf8ab3ccf..5c9977a08a 100644 --- a/test/jestLib/setup.js +++ b/test/jestLib/setup.js @@ -1,4 +1,5 @@ import '@testing-library/jest-dom' +import React from 'react' import log from 'cozy-logger' @@ -28,3 +29,11 @@ console.warn = function (msg, msg2) { } return originalWarn.apply(this, arguments) } + +jest.mock('cozy-dataproxy-lib', () => ({ + DataProxyProvider: ({ children }) => children, + SearchDialog: () =>
SearchDialog
, + AssistantDialog: () =>
AssistantDialog
, + AssistantDesktop: () =>
AssistantDesktop
, + AssistantMobile: () =>
AssistantMobile
+}))