Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
karma-sabarivka-reporter
Advanced tools
Readme
⭐️ Please, star me on GitHub — it helps!
karma-sabarivka-reporter – is a Karma plugin which adds untested files to istanbul coverage statistic
With karma
, to test source code – you need to include only *.spec.(ts|js)
files into test config. Then those spec files will import corresponding source code files. This leads to an issue with "fake" test coverage, as if some source code file would be omitted by all *.spec.(ts|js))
files – this source code file won't be shown in coverage report at all.
karma-sabarivka-reporter
plugin fixes described issue by going through all the source files and including them explicitly into coverage result.
Plugin works with both: TypeScript (*.ts
) and JavaScript (*.js
) files
*.js
and TypeScript *.ts
files supportWith npm installed, run
npm install --save-dev karma-sabarivka-reporter
@param {string[] | string} coverageReporter.include
- Glob pattern, string
or array of strings
. Files which should be included into the coverage result.
Important Note: if used with karma-coverage, 'sabarivka'
should go before 'coverage'
in reporters
list
Update karma.conf.js
include
as array of strings 🔝reporters: [
// ...
'sabarivka'
// 'coverage-istanbul' or 'coverage' (reporters order is important for 'coverage' reporter)
// ...
],
coverageReporter: {
include: [
// Specify include pattern(s) first
'src/**/*.(ts|js)',
// Then specify "do not touch" patterns (note `!` sign on the beginning of each statement)
'!src/main.(ts|js)',
'!src/**/*.spec.(ts|js)',
'!src/**/*.module.(ts|js)',
'!src/**/environment*.(ts|js)'
]
},
Same result may be achieved with more complex one line glob pattern
include
as string 🔝reporters: [
// ...
'sabarivka'
// 'coverage-istanbul' or 'coverage' (reporters order is important for 'coverage' reporter)
// ...
],
coverageReporter: {
include: 'src/**/!(*.spec|*.module|environment*|main).(ts|js)',
},
plugins
section 🔝If your karma config has plugins
section, add also karma-sabarivka-reporter
there, otherwise — no action is required.
Karma's documentation:
By default, Karma loads all sibling NPM modules which have a name starting with karma-*.
You can also explicitly list plugins you want to load via theplugins
configuration setting. The configuration value can either be a string (module name), which will be required by Karma, or an object (inlined plugin).
See here more info on how karma plugins loading works
plugins: [
// ...
require('karma-sabarivka-reporter'),
// ...
],
This software is licensed under the MIT
FAQs
A Karma plugin. Adds untested files to istanbul coverage statistic
The npm package karma-sabarivka-reporter receives a total of 4,616 weekly downloads. As such, karma-sabarivka-reporter popularity was classified as popular.
We found that karma-sabarivka-reporter 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.