Socket
Socket
Sign inDemoInstall

jest-circus

Package Overview
Dependencies
219
Maintainers
6
Versions
245
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3

68

build/index.js

@@ -360,3 +360,3 @@ /*!

error = asyncError;
error.message = originalError.message ? originalError.message : `thrown: ${(0, _prettyFormat.format)(originalError, {
error.message = originalError.message || `thrown: ${(0, _prettyFormat.format)(originalError, {
maxDepth: 3

@@ -415,3 +415,3 @@ })}`;

const operatorName = getOperatorName(operator, stack);
const trimmedStack = stack.replace(message, '').replace(/AssertionError(.*)/g, '');
const trimmedStack = stack.replace(message, '').replaceAll(/AssertionError(.*)/g, '');
if (operatorName === 'doesNotThrow') {

@@ -484,5 +484,5 @@ return (

const injectGlobalErrorHandlers = parentProcess => {
const uncaughtException = process.listeners('uncaughtException').slice();
const unhandledRejection = process.listeners('unhandledRejection').slice();
const rejectionHandled = process.listeners('rejectionHandled').slice();
const uncaughtException = [...process.listeners('uncaughtException')];
const unhandledRejection = [...process.listeners('unhandledRejection')];
const rejectionHandled = [...process.listeners('rejectionHandled')];
parentProcess.removeAllListeners('uncaughtException');

@@ -539,2 +539,5 @@ parentProcess.removeAllListeners('unhandledRejection');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Promise = globalThis[Symbol.for('jest-native-promise')] || globalThis.Promise;
/**

@@ -546,3 +549,7 @@ * Copyright (c) Meta Platforms, Inc. and affiliates.

*/
// Global values can be overwritten by mocks or tests. We'll capture
// the original values in the variables before we require any files.
const {
setTimeout
} = globalThis;
const run = async () => {

@@ -592,3 +599,6 @@ const {

// eslint-disable-next-line no-restricted-globals
parseInt(global[_types.RETRY_TIMES], 10) || 0;
Number.parseInt(global[_types.RETRY_TIMES], 10) || 0;
const waitBeforeRetry = Number.parseInt(
// eslint-disable-next-line no-restricted-globals
global[_types.WAIT_BEFORE_RETRY], 10) || 0;
const deferredRetryTests = [];

@@ -626,2 +636,5 @@ if (rng) {

});
if (waitBeforeRetry > 0) {
await new Promise(resolve => setTimeout(resolve, waitBeforeRetry));
}
await _runTest(test, isSkipped);

@@ -677,5 +690,5 @@ numRetriesAvailable--;

test.fn = () => promise;
} catch (err) {
} catch (error) {
test.fn = () => {
throw err;
throw error;
};

@@ -789,3 +802,2 @@ }

}
try {

@@ -955,3 +967,3 @@ await (0, _utils.callAsyncCircusFn)(test, testContext, {

}));
exports.TEST_TIMEOUT_SYMBOL = exports.STATE_SYM = exports.RETRY_TIMES = exports.LOG_ERRORS_BEFORE_RETRY = void 0;
exports.WAIT_BEFORE_RETRY = exports.TEST_TIMEOUT_SYMBOL = exports.STATE_SYM = exports.RETRY_TIMES = exports.LOG_ERRORS_BEFORE_RETRY = void 0;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;

@@ -967,2 +979,3 @@ /**

const RETRY_TIMES = exports.RETRY_TIMES = Symbol.for('RETRY_TIMES');
const WAIT_BEFORE_RETRY = exports.WAIT_BEFORE_RETRY = Symbol.for('WAIT_BEFORE_RETRY');
// To pass this value from Runtime object to state we need to use global[sym]

@@ -1293,3 +1306,3 @@ const TEST_TIMEOUT_SYMBOL = exports.TEST_TIMEOUT_SYMBOL = Symbol.for('TEST_TIMEOUT_SYMBOL');

status,
testPath: Array.from(testPath)
testPath: [...testPath]
};

@@ -1300,14 +1313,14 @@ };

const testResults = [];
for (const child of describeBlock.children) {
switch (child.type) {
case 'describeBlock':
{
testResults.push(...makeTestResults(child));
break;
}
case 'test':
{
testResults.push(makeSingleTestResult(child));
break;
}
const stack = [[describeBlock, 0]];
while (stack.length > 0) {
const [currentBlock, childIndex] = stack.pop();
for (let i = childIndex; i < currentBlock.children.length; i++) {
const child = currentBlock.children[i];
if (child.type === 'describeBlock') {
stack.push([currentBlock, i + 1], [child, 0]);
break;
}
if (child.type === 'test') {
testResults.push(makeSingleTestResult(child));
}
}

@@ -1334,2 +1347,3 @@ }

error = errors;
// eslint-disable-next-line unicorn/error-message
asyncError = new Error();

@@ -1362,3 +1376,3 @@ }

const fullName = ancestorTitles.join(' ');
const title = testNamesPath[testNamesPath.length - 1];
const title = testNamesPath.at(-1);
// remove title

@@ -1393,3 +1407,3 @@ ancestorTitles.pop();

failureDetails: testResult.errorsDetailed,
failureMessages: Array.from(testResult.errors),
failureMessages: [...testResult.errors],
fullName,

@@ -1399,3 +1413,3 @@ invocations: testResult.invocations,

numPassingAsserts: testResult.numPassingAsserts,
retryReasons: Array.from(testResult.retryReasons),
retryReasons: [...testResult.retryReasons],
status,

@@ -1402,0 +1416,0 @@ title

@@ -84,3 +84,6 @@ /*!

} else {
runtime.requireModule(path);
const setupFile = runtime.requireModule(path);
if (typeof setupFile === 'function') {
await setupFile();
}
}

@@ -141,3 +144,3 @@ }

// Copy the array to prevent memory leaks
results.snapshot.uncheckedKeys = Array.from(uncheckedKeys);
results.snapshot.uncheckedKeys = [...uncheckedKeys];
};

@@ -144,0 +147,0 @@ var _default = exports["default"] = jestAdapter;

{
"name": "jest-circus",
"version": "30.0.0-alpha.2",
"version": "30.0.0-alpha.3",
"repository": {

@@ -23,6 +23,6 @@ "type": "git",

"dependencies": {
"@jest/environment": "30.0.0-alpha.2",
"@jest/expect": "30.0.0-alpha.2",
"@jest/test-result": "30.0.0-alpha.2",
"@jest/types": "30.0.0-alpha.2",
"@jest/environment": "30.0.0-alpha.3",
"@jest/expect": "30.0.0-alpha.3",
"@jest/test-result": "30.0.0-alpha.3",
"@jest/types": "30.0.0-alpha.3",
"@types/node": "*",

@@ -33,10 +33,10 @@ "chalk": "^4.0.0",

"is-generator-fn": "^2.0.0",
"jest-each": "30.0.0-alpha.2",
"jest-matcher-utils": "30.0.0-alpha.2",
"jest-message-util": "30.0.0-alpha.2",
"jest-runtime": "30.0.0-alpha.2",
"jest-snapshot": "30.0.0-alpha.2",
"jest-util": "30.0.0-alpha.2",
"jest-each": "30.0.0-alpha.3",
"jest-matcher-utils": "30.0.0-alpha.3",
"jest-message-util": "30.0.0-alpha.3",
"jest-runtime": "30.0.0-alpha.3",
"jest-snapshot": "30.0.0-alpha.3",
"jest-util": "30.0.0-alpha.3",
"p-limit": "^3.1.0",
"pretty-format": "30.0.0-alpha.2",
"pretty-format": "30.0.0-alpha.3",
"pure-rand": "^6.0.0",

@@ -62,3 +62,3 @@ "slash": "^3.0.0",

},
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4"
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc