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.
component-mocker
Advanced tools
This package provides functionality for mocking objects easily (including functions and classes).
It has been extracted from jest.
You can find detailed documentation in the index.js
file.
The LICENSE and PATENTS files are copies from the jest project.
var mocker = require('component-mocker');
var myModule = ...; // Your module that you want to mock
var myModuleMetadata = mocker.getMetadata(myModule);
var myModuleMock = mocker.generateFromMetadata(myModuleMetadata);
You can also use the index.js
script in the browser.
The module is then available on the global scope under the name mocker
.
You can also run it in no conflict mode by calling var mocker = mocker.noConflict()
.
FAQs
Let you mock objects easily
The npm package component-mocker receives a total of 1 weekly downloads. As such, component-mocker popularity was classified as not popular.
We found that component-mocker 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
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.