Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-util

Package Overview
Dependencies
Maintainers
2
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-util - npm Package Compare versions

Comparing version 9.0.3 to 10.0.0

lib/__tests__/JasmineFormatter-test.js

22

lib/formatMessages.js

@@ -16,15 +16,12 @@ /**

// filter for noisy stack trace lines
const STACK_TRACE_LINE_IGNORE_RE = new RegExp([
'^timers.js$',
'^' + path.resolve(__dirname, '..', 'lib', 'moduleMocker.js'),
'^' + path.resolve(__dirname, '..', '..', 'vendor', 'jasmine'),
].join('|'));
const STACK_TRACE_LINE_IGNORE_RE =
/^\s+at.*?jest(-cli)?\/(vendor|src|node_modules|packages)\//;
function cleanStackTrace(stackTrace) {
let lines = 0;
const keepFirstLines = () => (lines++ < KEEP_TRACE_LINES);
return stackTrace.split('\n').filter(line => (
keepFirstLines() ||
!/^\s+at.*?jest(-cli)?\/(vendor|src|node_modules)\//.test(line)
)).join('\n');
return stackTrace.split('\n')
.filter(line =>
(lines++ < KEEP_TRACE_LINES) || !STACK_TRACE_LINE_IGNORE_RE.test(line)
)
.join('\n');
}

@@ -64,7 +61,8 @@

}
var filePath = matches[2];
// Filter out noisy and unhelpful lines from the stack trace.
if (STACK_TRACE_LINE_IGNORE_RE.test(filePath)) {
if (STACK_TRACE_LINE_IGNORE_RE.test(line)) {
return null;
}
const filePath = matches[2];
return (

@@ -71,0 +69,0 @@ matches[1] +

{
"name": "jest-util",
"version": "9.0.3",
"version": "10.0.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "dependencies": {

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