
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
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 6,302 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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.