
Research
Security News
Malicious npm Package Wipes Codebases with Remote Trigger
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
jest-preset-preact
Advanced tools
Jest preset containing all required configuration for writing tests for preact.
Features:
h()
react
imports to point to preact/compat
VNodes
in snapshots.css
, .less
, .sass/scss
, etc)Install it via npm or yarn:
npm install --save-dev jest-preset-preact
# or via yarn
yarn add -D jest-preset-preact
...and add the preset to your jest.config.js
file.
// jest.config.js
module.exports = {
preset: 'jest-preset-preact',
};
You can override the default Babel config by providing your own Babel config file:
// babel.config.js
module.exports = {
env: {
test: {
plugins: [
[
"@babel/plugin-transform-react-jsx",
{
runtime: "automatic",
importSource: "preact"
}
]
]
}
}
}
This, for example, would enable the runtime JSX transform instead of the classic.
MIT, see the LICENSE file.
FAQs
Jest preset for testing Preact apps
The npm package jest-preset-preact receives a total of 11,123 weekly downloads. As such, jest-preset-preact popularity was classified as popular.
We found that jest-preset-preact demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.
Security News
New CNA status enables OpenJS Foundation to assign CVEs for security vulnerabilities in projects like ESLint, Fastify, Electron, and others, while leaving disclosure responsibility with individual maintainers.