diff --git a/dist/index.js b/dist/index.js index e422148..45ad83c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=require("react"),React__default=_interopDefault(React),PropTypes=_interopDefault(require("prop-types")),isEqual=_interopDefault(require("lodash.isequal"));function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var l=0;l>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i { fireEvent.click(chk); expect(onChange).toHaveBeenCalledTimes(1); }); + test('should only call onChange once when pressing the select all checkbox', () => { + const onChange = jest.fn(); + + const { getByTestId } = rtlRender( + + ); + const chk = getByTestId('selectall-checkbox'); + expect(chk).toBeDefined(); + fireEvent.click(chk); + expect(onChange).toHaveBeenCalledTimes(1); + }); test('should still call onChange when pressing the option', () => { const onChange = jest.fn();