@codecademy/gamut-tests 5.1.4 → 5.1.5-alpha.23fbb5.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -15
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,9 +1,3 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
1
  import { GamutProvider, theme } from '@codecademy/gamut-styles';
8
2
  import { setupEnzyme as setupEnzymeBase, setupRtl as setupRtlBase } from 'component-test-setup';
9
3
  import overArgs from 'lodash/overArgs';
@@ -11,8 +5,10 @@ import * as React from 'react';
11
5
 
12
6
  // See https://www.notion.so/codecademy/Frontend-Unit-Tests-1cbf4e078a6647559b4583dfb6d3cb18 for more info
13
7
  import { jsx as _jsx } from "react/jsx-runtime";
14
- export var MockGamutProvider = function MockGamutProvider(_ref) {
15
- var children = _ref.children;
8
+ export const MockGamutProvider = _ref => {
9
+ let {
10
+ children
11
+ } = _ref;
16
12
  return /*#__PURE__*/_jsx(GamutProvider, {
17
13
  useGlobals: false,
18
14
  useCache: false,
@@ -21,11 +17,11 @@ export var MockGamutProvider = function MockGamutProvider(_ref) {
21
17
  });
22
18
  };
23
19
  function withMockGamutProvider(WrappedComponent) {
24
- var WithBoundaryComponent = function WithBoundaryComponent(props) {
25
- return /*#__PURE__*/_jsx(MockGamutProvider, {
26
- children: /*#__PURE__*/_jsx(WrappedComponent, _objectSpread({}, props))
27
- });
28
- };
20
+ const WithBoundaryComponent = props => /*#__PURE__*/_jsx(MockGamutProvider, {
21
+ children: /*#__PURE__*/_jsx(WrappedComponent, {
22
+ ...props
23
+ })
24
+ });
29
25
  return WithBoundaryComponent;
30
26
  }
31
27
 
@@ -34,5 +30,5 @@ function withMockGamutProvider(WrappedComponent) {
34
30
  /**
35
31
  * @deprecated Enzyme is no longer being maintained. Use RTL instead.
36
32
  */
37
- export var setupEnzyme = overArgs(setupEnzymeBase, withMockGamutProvider);
38
- export var setupRtl = overArgs(setupRtlBase, withMockGamutProvider);
33
+ export const setupEnzyme = overArgs(setupEnzymeBase, withMockGamutProvider);
34
+ export const setupRtl = overArgs(setupRtlBase, withMockGamutProvider);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@codecademy/gamut-tests",
3
3
  "description": "Shared component test setup for Gamut applications",
4
- "version": "5.1.4",
4
+ "version": "5.1.5-alpha.23fbb5.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/gamut-styles": "17.1.2",
7
+ "@codecademy/gamut-styles": "17.1.3-alpha.23fbb5.0",
8
8
  "component-test-setup": "*",
9
9
  "lodash": "^4.17.5"
10
10
  },
@@ -33,5 +33,5 @@
33
33
  "verify": "tsc --noEmit"
34
34
  },
35
35
  "types": "./dist/index.d.ts",
36
- "gitHead": "0621dd5f80535233e947dd5122c5ab5184f7a665"
36
+ "gitHead": "157bdcfb371c326ca8cdda1a1a71d1f1fe6c1847"
37
37
  }