How to use the is-touch-device.mockReturnValue function in is-touch-device

To help you get started, we’ve selected a few is-touch-device 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 commercetools / ui-kit / date-picker / date-picker.spec.js View on Github external
beforeEach(() => {
    isTouchDevice.mockClear();
    isTouchDevice.mockReturnValue(false);
  });
  describe('defaultProps', () => {
github commercetools / ui-kit / date-picker / date-picker.spec.js View on Github external
beforeEach(() => {
        Flatpickr.mockClear();
        isTouchDevice.mockClear();
        isTouchDevice.mockReturnValue(true);
        props = createTestProps();
        wrapper = shallow();
        wrapper.instance().componentDidMount();
      });

is-touch-device

Is the current JS environment a touch device?

MIT
Latest version published 7 years ago

Package Health Score

59 / 100
Full package analysis