New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mighty-justice/tester

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mighty-justice/tester - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

124

dist/tester.cjs.js

@@ -489,50 +489,86 @@ 'use strict';

/*#__PURE__*/
regeneratorRuntime.mark(function _callee4() {
var _this3 = this;
regeneratorRuntime.mark(function _callee3() {
var mountOpts,
_iteratorNormalCompletion,
_didIteratorError,
_iteratorError,
_iterator,
_step,
hook,
initialMount,
WrapperTree,
_args4 = arguments;
return regeneratorRuntime.wrap(function _callee4$(_context4) {
_args3 = arguments;
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context3.prev = _context3.next) {
case 0:
mountOpts = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
mountOpts = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
// Loop through hooks onBeforeMount(),
this.config.getValidHooks(this, 'onBeforeMount').forEach(
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3(hook) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return hook.onBeforeMount(_this3, mountOpts);
// This MUST be a regular for () loop to not throw the promise away. (forEach won't work)
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context3.prev = 4;
_iterator = this.config.getValidHooks(this, 'onBeforeMount')[Symbol.iterator]();
case 2:
case "end":
return _context3.stop();
}
}
}, _callee3, this);
}));
case 6:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context3.next = 13;
break;
}
return function (_x3) {
return _ref.apply(this, arguments);
};
}()); // Allows you to fetch data to set as props, prepare extra stores, etc.
hook = _step.value;
_context3.next = 10;
return hook.onBeforeMount(this, mountOpts);
case 10:
_iteratorNormalCompletion = true;
_context3.next = 6;
break;
case 13:
_context3.next = 19;
break;
case 15:
_context3.prev = 15;
_context3.t0 = _context3["catch"](4);
_didIteratorError = true;
_iteratorError = _context3.t0;
case 19:
_context3.prev = 19;
_context3.prev = 20;
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
case 22:
_context3.prev = 22;
if (!_didIteratorError) {
_context3.next = 25;
break;
}
throw _iteratorError;
case 25:
return _context3.finish(22);
case 26:
return _context3.finish(19);
case 27:
if (!this.onBeforeMount) {
_context4.next = 5;
_context3.next = 30;
break;
}
_context4.next = 5;
_context3.next = 30;
return this.onBeforeMount(this);
case 5:
case 30:
initialMount = this.initialMount || React__default.createElement(this.TestedComponent, this.props);

@@ -548,7 +584,7 @@ WrapperTree = this.getWrappers().reduce(function (Tree, wrapper) {

}, initialMount);
_context4.next = 9;
_context3.next = 34;
return this.config.enzyme.mount(WrapperTree);
case 9:
this.wrapper = _context4.sent;
case 34:
this.wrapper = _context3.sent;

@@ -560,21 +596,21 @@ if (this.opts.shallow) {

if (!mountOpts.async) {
_context4.next = 15;
_context3.next = 40;
break;
}
_context4.next = 14;
_context3.next = 39;
return this.sleep();
case 14:
case 39:
this.update();
case 15:
return _context4.abrupt("return", this);
case 40:
return _context3.abrupt("return", this);
case 16:
case 41:
case "end":
return _context4.stop();
return _context3.stop();
}
}
}, _callee4, this);
}, _callee3, this, [[4, 15, 19, 27], [20,, 22, 26]]);
}));

@@ -581,0 +617,0 @@

@@ -482,50 +482,86 @@ import React, { Fragment } from 'react';

/*#__PURE__*/
regeneratorRuntime.mark(function _callee4() {
var _this3 = this;
regeneratorRuntime.mark(function _callee3() {
var mountOpts,
_iteratorNormalCompletion,
_didIteratorError,
_iteratorError,
_iterator,
_step,
hook,
initialMount,
WrapperTree,
_args4 = arguments;
return regeneratorRuntime.wrap(function _callee4$(_context4) {
_args3 = arguments;
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context3.prev = _context3.next) {
case 0:
mountOpts = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
mountOpts = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
// Loop through hooks onBeforeMount(),
this.config.getValidHooks(this, 'onBeforeMount').forEach(
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3(hook) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return hook.onBeforeMount(_this3, mountOpts);
// This MUST be a regular for () loop to not throw the promise away. (forEach won't work)
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context3.prev = 4;
_iterator = this.config.getValidHooks(this, 'onBeforeMount')[Symbol.iterator]();
case 2:
case "end":
return _context3.stop();
}
}
}, _callee3, this);
}));
case 6:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context3.next = 13;
break;
}
return function (_x3) {
return _ref.apply(this, arguments);
};
}()); // Allows you to fetch data to set as props, prepare extra stores, etc.
hook = _step.value;
_context3.next = 10;
return hook.onBeforeMount(this, mountOpts);
case 10:
_iteratorNormalCompletion = true;
_context3.next = 6;
break;
case 13:
_context3.next = 19;
break;
case 15:
_context3.prev = 15;
_context3.t0 = _context3["catch"](4);
_didIteratorError = true;
_iteratorError = _context3.t0;
case 19:
_context3.prev = 19;
_context3.prev = 20;
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
case 22:
_context3.prev = 22;
if (!_didIteratorError) {
_context3.next = 25;
break;
}
throw _iteratorError;
case 25:
return _context3.finish(22);
case 26:
return _context3.finish(19);
case 27:
if (!this.onBeforeMount) {
_context4.next = 5;
_context3.next = 30;
break;
}
_context4.next = 5;
_context3.next = 30;
return this.onBeforeMount(this);
case 5:
case 30:
initialMount = this.initialMount || React.createElement(this.TestedComponent, this.props);

@@ -541,7 +577,7 @@ WrapperTree = this.getWrappers().reduce(function (Tree, wrapper) {

}, initialMount);
_context4.next = 9;
_context3.next = 34;
return this.config.enzyme.mount(WrapperTree);
case 9:
this.wrapper = _context4.sent;
case 34:
this.wrapper = _context3.sent;

@@ -553,21 +589,21 @@ if (this.opts.shallow) {

if (!mountOpts.async) {
_context4.next = 15;
_context3.next = 40;
break;
}
_context4.next = 14;
_context3.next = 39;
return this.sleep();
case 14:
case 39:
this.update();
case 15:
return _context4.abrupt("return", this);
case 40:
return _context3.abrupt("return", this);
case 16:
case 41:
case "end":
return _context4.stop();
return _context3.stop();
}
}
}, _callee4, this);
}, _callee3, this, [[4, 15, 19, 27], [20,, 22, 26]]);
}));

@@ -574,0 +610,0 @@

@@ -488,50 +488,86 @@ (function (global, factory) {

/*#__PURE__*/
regeneratorRuntime.mark(function _callee4() {
var _this3 = this;
regeneratorRuntime.mark(function _callee3() {
var mountOpts,
_iteratorNormalCompletion,
_didIteratorError,
_iteratorError,
_iterator,
_step,
hook,
initialMount,
WrapperTree,
_args4 = arguments;
return regeneratorRuntime.wrap(function _callee4$(_context4) {
_args3 = arguments;
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context4.prev = _context4.next) {
switch (_context3.prev = _context3.next) {
case 0:
mountOpts = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
mountOpts = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
// Loop through hooks onBeforeMount(),
this.config.getValidHooks(this, 'onBeforeMount').forEach(
/*#__PURE__*/
function () {
var _ref = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3(hook) {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return hook.onBeforeMount(_this3, mountOpts);
// This MUST be a regular for () loop to not throw the promise away. (forEach won't work)
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context3.prev = 4;
_iterator = this.config.getValidHooks(this, 'onBeforeMount')[Symbol.iterator]();
case 2:
case "end":
return _context3.stop();
}
}
}, _callee3, this);
}));
case 6:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context3.next = 13;
break;
}
return function (_x3) {
return _ref.apply(this, arguments);
};
}()); // Allows you to fetch data to set as props, prepare extra stores, etc.
hook = _step.value;
_context3.next = 10;
return hook.onBeforeMount(this, mountOpts);
case 10:
_iteratorNormalCompletion = true;
_context3.next = 6;
break;
case 13:
_context3.next = 19;
break;
case 15:
_context3.prev = 15;
_context3.t0 = _context3["catch"](4);
_didIteratorError = true;
_iteratorError = _context3.t0;
case 19:
_context3.prev = 19;
_context3.prev = 20;
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
case 22:
_context3.prev = 22;
if (!_didIteratorError) {
_context3.next = 25;
break;
}
throw _iteratorError;
case 25:
return _context3.finish(22);
case 26:
return _context3.finish(19);
case 27:
if (!this.onBeforeMount) {
_context4.next = 5;
_context3.next = 30;
break;
}
_context4.next = 5;
_context3.next = 30;
return this.onBeforeMount(this);
case 5:
case 30:
initialMount = this.initialMount || React__default.createElement(this.TestedComponent, this.props);

@@ -547,7 +583,7 @@ WrapperTree = this.getWrappers().reduce(function (Tree, wrapper) {

}, initialMount);
_context4.next = 9;
_context3.next = 34;
return this.config.enzyme.mount(WrapperTree);
case 9:
this.wrapper = _context4.sent;
case 34:
this.wrapper = _context3.sent;

@@ -559,21 +595,21 @@ if (this.opts.shallow) {

if (!mountOpts.async) {
_context4.next = 15;
_context3.next = 40;
break;
}
_context4.next = 14;
_context3.next = 39;
return this.sleep();
case 14:
case 39:
this.update();
case 15:
return _context4.abrupt("return", this);
case 40:
return _context3.abrupt("return", this);
case 16:
case 41:
case "end":
return _context4.stop();
return _context3.stop();
}
}
}, _callee4, this);
}, _callee3, this, [[4, 15, 19, 27], [20,, 22, 26]]);
}));

@@ -580,0 +616,0 @@

{
"name": "@mighty-justice/tester",
"version": "1.0.0",
"version": "1.0.1",
"description": "Bootstrap your tests!",

@@ -5,0 +5,0 @@ "main": "dist/tester.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc