This is a Sublime Text plugin that highlights sections of code not covered by tests from Istanbul's JSON report.
- Precise highlights of missing branches, functions and statements
- Show a tooltip popup and set status bar message on hover
- Allow changing scope name for customizable highlight colors
- Works well in a Git project. Easy if all your projects put generated coverage reports in same location.
- If it's not a Git project, it inspects the first folder in the window.
TODO: Through Package Control:
Command Palette
> Package Control: Install Package
> IstanbulCoverage
Or manually clone the repo:
cd "~/Library/Application Support/Sublime Text 3/Packages"
git clone --depth 1 https://github.com/dekpient/sublime-istanbul-coverage.git IstanbulCoverage
Preferences
> IstanbulCoverage
> Settings – User
coverage_on_load
- Display coverage on load, defaults to Falsecoverage_local_path
- This is a local path from the root of your Git project to your report .json file, defaults tocoverage/coverage-final.json
uncovered_scope_name
- Defaults toinvalid.illegal
missing_branch_scope_name
- Defaults toinvalid.unimplemented
Command Palette
> Toggle Coverage Report
Or add your own key binding in Preferences
> Key Bindings
e.g.
[
{ "keys": ["super+t", "super+c"], "command": "toggle_coverage_report" }
]