Updating NPM dependencies
This commit is contained in:
86
node_modules/jest-jasmine2/build/treeProcessor.js
generated
vendored
86
node_modules/jest-jasmine2/build/treeProcessor.js
generated
vendored
@@ -4,41 +4,6 @@ Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = treeProcessor;
|
||||
var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;
|
||||
var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;
|
||||
var Promise = global[Symbol.for('jest-native-promise')] || global.Promise;
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function() {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value);
|
||||
}
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);
|
||||
}
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
@@ -47,11 +12,13 @@ function _asyncToGenerator(fn) {
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
function treeProcessor(options) {
|
||||
const nodeComplete = options.nodeComplete,
|
||||
nodeStart = options.nodeStart,
|
||||
queueRunnerFactory = options.queueRunnerFactory,
|
||||
runnableIds = options.runnableIds,
|
||||
tree = options.tree;
|
||||
const {
|
||||
nodeComplete,
|
||||
nodeStart,
|
||||
queueRunnerFactory,
|
||||
runnableIds,
|
||||
tree
|
||||
} = options;
|
||||
|
||||
function isEnabled(node, parentEnabled) {
|
||||
return parentEnabled || runnableIds.indexOf(node.id) !== -1;
|
||||
@@ -71,35 +38,24 @@ function treeProcessor(options) {
|
||||
}
|
||||
|
||||
function getNodeWithChildrenHandler(node, enabled) {
|
||||
return (
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _fn = _asyncToGenerator(function*(done = () => {}) {
|
||||
nodeStart(node);
|
||||
yield queueRunnerFactory({
|
||||
onException: error => node.onException(error),
|
||||
queueableFns: wrapChildren(node, enabled),
|
||||
userContext: node.sharedUserContext()
|
||||
});
|
||||
nodeComplete(node);
|
||||
done();
|
||||
});
|
||||
|
||||
function fn() {
|
||||
return _fn.apply(this, arguments);
|
||||
}
|
||||
|
||||
return fn;
|
||||
})()
|
||||
);
|
||||
return async function fn(done = () => {}) {
|
||||
nodeStart(node);
|
||||
await queueRunnerFactory({
|
||||
onException: error => node.onException(error),
|
||||
queueableFns: wrapChildren(node, enabled),
|
||||
userContext: node.sharedUserContext()
|
||||
});
|
||||
nodeComplete(node);
|
||||
done();
|
||||
};
|
||||
}
|
||||
|
||||
function hasEnabledTest(node) {
|
||||
function hasNoEnabledTest(node) {
|
||||
if (node.children) {
|
||||
return node.children.some(hasEnabledTest);
|
||||
return node.children.every(hasNoEnabledTest);
|
||||
}
|
||||
|
||||
return !node.disabled;
|
||||
return node.disabled || node.markedPending;
|
||||
}
|
||||
|
||||
function wrapChildren(node, enabled) {
|
||||
@@ -111,7 +67,7 @@ function treeProcessor(options) {
|
||||
fn: getNodeHandler(child, enabled)
|
||||
}));
|
||||
|
||||
if (!hasEnabledTest(node)) {
|
||||
if (hasNoEnabledTest(node)) {
|
||||
return children;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user