
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
jest-without-globals
Advanced tools
Explicitly import Jest globals.
npm i -D jest-without-globals
(note that jest
is a peer dependency)
import { describe, it, expect } from 'jest-without-globals'
describe('describe should create a section', () => {
it('it should checkmark', () => {
expect('').toBe('')
})
})
All of the functions available in Jest's API, as well as jest
and expect
, can be imported from jest-without-globals
.
Can take a look at the tests for usage of more of the globals, but basically you can now just import
any Jest global.
Basically just takes Jest's globals and exports them. The source code is currently shorter than this README, so take a look under the hood! :)
Some inspiration came from this workaround to avoid globals, which I had been using in projects previously.
I wanted a package I could re-use in all my projects' tests instead of constantly having to create a helper file and map its name, and so jest-without-globals
was born!
FAQs
Explicitly import Jest globals
The npm package jest-without-globals receives a total of 1,024 weekly downloads. As such, jest-without-globals popularity was classified as popular.
We found that jest-without-globals 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
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.