How to use the cozy-ui/transpiled/react/hooks/useBreakpoints.mockReturnValue function in cozy-ui

To help you get started, we’ve selected a few cozy-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cozy / cozy.github.io / en / cozy-banks / src / components / Title / PageTitle.spec.jsx View on Github external
it(`should display children on mobile`, () => {
    useBreakpoints.mockReturnValue({ isMobile: true })
    expect(
      shallow(content).getElement()
    ).toMatchSnapshot()
  })
github cozy / cozy.github.io / en / cozy-banks / src / ducks / balance / BalanceDetailsHeader.spec.jsx View on Github external
const setup = options => {
  const { props, breakpoints } = options
  useBreakpoints.mockReturnValue(breakpoints)
  return mount(
    
      
    ,
    {
      context: {
        router: {
          ...mockRouter,
          getCurrentLocation: () => ({
            pathname: '/'
          })
        }
      },
      childContextTypes: {
        router: PropTypes.object
      }