aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-01-16 22:53:59 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commitf4cfa2b9c0a7a1326b6b9b11f86ef5118c3a622a (patch)
treedbac0337063cd7072ae8596c8abe11230ebba2f1 /vnext/src
parent62b55dab33eefb69859a73b762d1ee4c47d8560f (diff)
add jest workaround: https://github.com/airbnb/enzyme/issues/1875
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/components/__tests__/MessageInput-test.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/vnext/src/components/__tests__/MessageInput-test.js b/vnext/src/components/__tests__/MessageInput-test.js
index 1cf89ebf..c26d622c 100644
--- a/vnext/src/components/__tests__/MessageInput-test.js
+++ b/vnext/src/components/__tests__/MessageInput-test.js
@@ -5,6 +5,12 @@ import Adapter from 'enzyme-adapter-react-16';
import MessageInput from '../MessageInput';
+// Remove when it will be fixed: https://github.com/airbnb/enzyme/issues/1875
+jest.mock('react', () => {
+ const r = jest.requireActual('react');
+ return { ...r, memo: (x) => x };
+});
+
configure({ adapter: new Adapter() });
const testMessage = {
@@ -16,9 +22,9 @@ const testMessage = {
window.matchMedia = window.matchMedia || function() {
return {
- matches : false,
- addListener : function() {},
- removeListener: function() {}
+ matches: false,
+ addListener: function() { },
+ removeListener: function() { }
};
};