all repos — caroster @ ec8b25be9fb27eea5119a512c5b62bc6166a5354

[Octree] Group carpool to your event https://caroster.io

app/src/setupTests.js (view raw)

 1// jest-dom adds custom jest matchers for asserting on DOM nodes.
 2// allows you to do things like:
 3// expect(element).toHaveTextContent(/react/i)
 4// learn more: https://github.com/testing-library/jest-dom
 5import '@testing-library/jest-dom/extend-expect';
 6import './i18n';
 7
 8// FROM https://github.com/akiran/react-slick/blob/master/test-setup.js
 9window.matchMedia =
10  window.matchMedia ||
11  function () {
12    return {
13      matches: false,
14      addListener: function () {},
15      removeListener: function () {},
16    };
17  };
18
19window.requestAnimationFrame =
20  window.requestAnimationFrame ||
21  function (callback) {
22    setTimeout(callback, 0);
23  };