Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@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 275 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.