
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@storybook/addon-coverage
Advanced tools
Tools to support code coverage in Storybook
Tools to support code coverage in Storybook and the Storybook test runner
Install this addon by adding the @storybook/addon-coverage
dependency:
yarn add -D @storybook/addon-coverage
And by registering it in your .storybook/main.js
:
module.exports = {
addons: ['@storybook/addon-coverage'],
};
This addon instruments your code by using babel-plugin-istanbul. It provides some default configuration, but if you want to add yours, you can do so by setting the options in your .storybook/main.js
:
module.exports = {
addons: [
{
name: '@storybook/addon-coverage',
options: {
istanbul: {
include: ["**/stories/**"]
}
}
}
],
};
The available options are as follows:
Option name | Description | Type | Default |
---|---|---|---|
cwd | Set the working directory | String | ['**'] |
include | See here for more info | Array<String> | ['**'] |
exclude | See here for more info | Array<String> | list |
extension | List of extensions that nyc should attempt to handle in addition to .js | Array<String> | ['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte] |
yarn start
runs babel in watch mode and starts Storybookyarn build
build and package your addon codeFAQs
Tools to support code coverage in Storybook
The npm package @storybook/addon-coverage receives a total of 238,240 weekly downloads. As such, @storybook/addon-coverage popularity was classified as popular.
We found that @storybook/addon-coverage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.