@jobber/hooks 2.10.3-SCOTTTHd.36 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  const react_1 = require("@testing-library/react");
7
+ const random_1 = __importDefault(require("lodash/random"));
4
8
  const mockViewportWidth_1 = require("./mockViewportWidth");
5
9
  const useBreakpoints_1 = require("./useBreakpoints");
6
10
  const { cleanup, setViewportWidth } = (0, mockViewportWidth_1.mockViewportWidth)();
@@ -92,7 +96,7 @@ describe("useBreakpoints", () => {
92
96
  });
93
97
  describe("in between values", () => {
94
98
  function randomBreakpoint(min, max) {
95
- return Math.floor(min + Math.random() * (max - min + 1));
99
+ return (0, random_1.default)(min, max - 1);
96
100
  }
97
101
  it("should have the correct breakpoint values on higher than xl size screens", () => {
98
102
  setViewportWidth(randomBreakpoint(useBreakpoints_1.BREAKPOINT_SIZES.xl, 10000));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/hooks",
3
- "version": "2.10.3-SCOTTTHd.36+8c31ae39",
3
+ "version": "2.11.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@apollo/react-testing": "^4.0.0",
23
- "@jobber/formatters": "^0.3.1-SCOTTTHd.184+8c31ae39",
23
+ "@jobber/formatters": "^0.3.0",
24
24
  "@testing-library/react": "^14.0.0",
25
25
  "@testing-library/react-hooks": "^7.0.0",
26
26
  "@testing-library/user-event": "^14.5.1",
@@ -44,5 +44,5 @@
44
44
  "@apollo/client": "^3.0.0",
45
45
  "react": "^18.2.0"
46
46
  },
47
- "gitHead": "8c31ae394a1ef6e001ffd950cc2799c73bad32d3"
47
+ "gitHead": "154ed3bb3f96c4cc2f162fce0ca7d81b675deec9"
48
48
  }