From ceaef7eed22fbfc9f689a3b543a1b35df5e231b7 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Mon, 25 Feb 2019 10:56:38 -0600 Subject: [PATCH] test(react): Add matchMedia to jest setup. (#17606) --- react/jest.setup.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/react/jest.setup.js b/react/jest.setup.js index 23b59855ee5..b0780a0cc91 100644 --- a/react/jest.setup.js +++ b/react/jest.setup.js @@ -1 +1,9 @@ global.crypto = require('@trust/webcrypto'); + +window.matchMedia = window.matchMedia || function() { + return { + matches : false, + addListener : function() {}, + removeListener: function() {} + }; +};