all repos — caroster @ 354035ce0132854c931c73a0751dbe3d98a8ceb9

[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  (() => ({
12    matches: false,
13    addListener: () => {},
14    removeListener: () => {},
15  }));
16
17window.requestAnimationFrame =
18  window.requestAnimationFrame || (callback => setTimeout(callback, 0));