Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
wct-istanbul
Advanced tools
Istanbul coverage reporting for projects being tested by web-component-tester
A fork of web-component-tester-istanbul Istanbul coverage plugin for web-component-tester@^6.6.0.
Use this plugin to collect and report test coverage (via istanbul) for your project on each test run.
Syntax | Status |
---|---|
ES2015+ | ✅ |
ES Modules | ✅ |
object rest/spread properties | ✅ |
async/await | ✅ |
import.meta | ✅ |
async iterator | ✅ |
npm install --save-dev wct-istanbul
Add the following configuration to web-component-tester's config file.
module.exports = {
plugins: {
istanbul: {
dir: "./coverage",
reporters: ["text-summary", "lcov"],
include: [
"**/*.js"
],
exclude: [
"/polymer/polymer.js",
"/platform/platform.js"
]
}
}
}
Below are the available configuration options:
The directory to write coverage reports to.
An array of istanbul reporters to use.
Files to include in instrumentation.
Files to exclude from instrumentation (this trumps files 'included' with the option above).
In addition to measuring coverage, this plugin can be used to enforce coverage thresholds. If coverage does not meet the configured thresholds, then the test run will fail, even if all tests passed.
This requires specifying the thresholds
option for the plugin
The following configuration will cause the test run to fail if less than 100% of the statements in instrumented files are covered by tests.
module.exports = {
plugins: {
istanbul: {
dir: "./coverage",
reporters: ["text-summary", "lcov"],
include: [
"**/*.js"
],
exclude: [
"/polymer/polymer.js",
"/platform/platform.js"
],
thresholds: {
global: {
statements: 100
}
}
}
}
}
FAQs
Istanbul coverage reporting for projects being tested by web-component-tester
The npm package wct-istanbul receives a total of 78 weekly downloads. As such, wct-istanbul popularity was classified as not popular.
We found that wct-istanbul 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.