Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@universal-packages/background-jobs-jest
Advanced tools
Jest matchers for Background Jobs testing.
npm install @universal-packages/background-jobs-jest
npm install @universal-packages/background-jobs
Add the following to your jest.config.js
or where you configure Jest:
module.exports = {
setupFilesAfterEnv: ['@universal-packages/background-jobs-jest']
}
import { MyJob } from './MyJob'
it('should enqueue MyJob', async () => {
await MyJob.performLater()
expect(MyJob).toHaveBeenEnqueued()
})
import { MyJob } from './MyJob'
it('should enqueue MyJob with payload', async () => {
await MyJob.performLater({ id: 1 })
expect(MyJob).toHaveBeenEnqueuedWith({ id: 1 })
})
In order for typescript to see the global types you need to reference the types somewhere in your project, normally ./src/globals.d.ts
.
/// <reference types="@universal-packages/background-jobs-jest" />
This library is developed in TypeScript and shipped fully typed.
The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.
FAQs
Jest matchers for Background Jobs
The npm package @universal-packages/background-jobs-jest receives a total of 251 weekly downloads. As such, @universal-packages/background-jobs-jest popularity was classified as not popular.
We found that @universal-packages/background-jobs-jest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.