import React__default from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import PixelSlider from './index.js';
import '../slicedToArray-BB-AwwkK.js';
import '../slider/index.js';
import '../extends-C4cduGrv.js';
import '../typeof-CgC7Bq6K.js';
import '../objectWithoutProperties-TXwlfNxG.js';
import 'classnames';
import '../label/index.js';
import 'prop-types';
import '@reach/visually-hidden';

var handleChangeMock = jest.fn(function (value) {
  return value;
});
afterEach(function () {
  jest.clearAllMocks();
});
test("PixelSlider returns Number-type values", function () {
  render( /*#__PURE__*/React__default.createElement(PixelSlider, {
    label: "foo",
    name: "bar",
    value: 0,
    onChange: handleChangeMock
  }));
  var input = screen.getByLabelText("foo");
  userEvent.type(input, "7");
  expect(handleChangeMock).toHaveBeenCalledWith(7);
});
test("PixelSlider doesn't return strings", function () {
  render( /*#__PURE__*/React__default.createElement(PixelSlider, {
    label: "foo",
    name: "bar",
    value: 0,
    onChange: handleChangeMock
  }));
  var input = screen.getByLabelText("foo");
  userEvent.type(input, "string!");
  expect(handleChangeMock).not.toHaveBeenCalled();
});
