
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
jest-sentry-environment
Advanced tools
Adds Sentry performance monitoring to your jest test suites to find your slowest tests.

First, you will need to add the jest-sentry-environment package to your application, as well as the Sentry SDKs.
npm install @sentry/node @sentry/tracing jest-sentry-environment
Then, in your jest configuration file, e.g. jest.config.js you will need to specify the path to the environment as well as some options.
{
testEnvironment: 'jest-sentry-environment/jsdom', // or `jest-sentry-environment/node` for node environment
testEnvironmentOptions: {
sentryConfig: {
// `init` will be passed to `Sentry.init()`
init: {
dsn: '<your DSN here>'
environment: !!process.env.CI ? 'ci' : 'local',
tracesSampleRate: 1.0,
},
transactionOptions: {
// `tags` will be used for the test suite transaction
tags: {
branch: process.env.GITHUB_REF,
commit: process.env.GITHUB_SHA,
},
},
},
},
}
You can either import the jsdom or node environments. You can also customize the base environment by specifying your own testEnvironment.
testEnvironment: './path/to/env.js',
In ./path/to/env.js:
const {createEnvironment} = require('jest-sentry-environment');
return createEnvironment({
baseEnvironment: require('jest-environment-node'),
});
FAQs
Sentry instrumentation for jest
The npm package jest-sentry-environment receives a total of 8,863 weekly downloads. As such, jest-sentry-environment popularity was classified as popular.
We found that jest-sentry-environment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.