
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
separated-coverage
Advanced tools
[](https://travis-ci.org/mdevils/separated-coverage) [](https://coveralls.i
Coverage toolkit designed to collect coverage information separately for each test.
Unlike most coverage tools, separated-coverage keeps connection between source file and its test file.
For each source file coverage is beeing computed only when its tests are running.
This ensures you have correct test coverage for each file beeing tested.
For example you have file source.js and its test: source.test.js.
separated-coverage collects coverage for source.js only when source.test.js is running.
The way source file and test file are beeing linked is configurable.
npm install separated-coverage --save-dev
First, install coveralls module:
npm install coveralls --save-dev
Create run script for Travis in package.json. Assuming you are using mocha, your sources are in lib directory and tests in test:
"scripts": {
"test": "...",
"travis": "npm test && scov run -q -r lcov -a lib -s 'lib/**/*.js' -a test -t 'test/**/*.js' -- lib test | coveralls"
}
Change default Travis action from npm test to npm run travis in .travis.yml:
language: node_js
script: "npm run travis"
#...
More about coveralls: https://coveralls.io/
More about coveralls npm package: https://github.com/cainus/node-coveralls
Usage:
scov run [-p <profile>] [-d <driver>] [-b <filename>] [-r <reporter>] [-f <filename>]
[-q] [-A <name>] [-I] [-S <file-set> [-O <name>]...] [-o <filename>]
[-e <mask>]... [-s <mask>]... [-t <mask>]... [-a <mask>]... [-- <runner-args>...]
scov instrument [-p <profile>] [-d <driver>] [-A <name>] [-I] [-q] [-f <filename>]
[-S <file-set> [-O <name>]...]
[-e <mask>]... [-s <mask>]... [-t <mask>]... <path>...
scov report [-p <profile>] [-a <path>]... [-e <mask>]... [-s <mask>]... [-t <mask>]...
[-q] [-S <file-set> [-O <name>]...]
[-r <reporter>] [-o <filename>] <coverage-file>
scov --version
scov --help
Options:
-s --sources=<mask> Source files masks. Example: "lib/**".
-t --tests=<mask> Test files masks. Example: "test/**".
-e --excludes=<mask> Excluded file mask. Example: "lib/**.tmp.js".
-a --additional=<path> Additional files for the coverage report.
Useful when tests do not affect all the files.
-b --bin=<filename> Specifies executable file for test driver.
-d --driver=<driver> Specifies driver [default: mocha].
-r --reporter=<name> Reporer name: html, lcov, summary, teamcity, tree [default: tree].
-o --output=<filename> Report output filename.
-f --file=<filename> Saves "json"-coverage information to specified file.
-X --no-export Do not include json-save action into instrumented file.
-p --profile=<profile> Reads profile from "package.json".
-S --set=<set> File set. Test name source for input files [default: basename].
-O --set-opt <name>=<val> File set option.
-A --api-object-name=<name> Export API to an object in instrumented files.
-I --include-init-coverage Includes initialization coverage information.
-q --quiet Runs quietly.
--help Show this screen.
--version Show version.
FAQs
[](https://travis-ci.org/mdevils/separated-coverage) [](https://coveralls.i
We found that separated-coverage 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.