
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
jest-test-performance
Advanced tools
jest-test-performance is a package designed to simplify testing performance.
Performance is notoriously difficult to test in a meaningful way. It varies by network, machine, and all sorts of circumstances outside our control. And it's affected by our psychology; a page that loads something quickly feels faster even if it is just a skeleton of how the page will look.
That doesn't change the fact that performance is meaningful, and we shouldn't disregard it because it's difficult.
This package distills performance down to a single millisecond score that it expects a function to take to run. It can't take in to account every machine, browser, or network, but it provides a baseline based on an average machine, that we can test against.
I would recommend using this more in integration than unit tests, unless you are confident that you have a distinct unit that is a bottleneck.
Add to your project using npm i -D jest-test-performance
First you need to import the package during the jest setup.
"jest": {
"setupFilesAfterEnv": ["jest-test-performance"]
}
And then you can use the condition during assertions.
it('should run faster than 100ms', async () => {
const dummyFunction = () => {};
await expect(dummyFunction).toBeFasterThan(100);
});
FAQs
Jest extenstion to simplify testing performance
The npm package jest-test-performance receives a total of 215 weekly downloads. As such, jest-test-performance popularity was classified as not popular.
We found that jest-test-performance 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.