Skip to content

Sublime Text plugin for test coverage reporting

Notifications You must be signed in to change notification settings

dekpient/sublime-istanbul-coverage

 
 

Repository files navigation

Sublime Istanbul Coverage

This is a Sublime Text plugin that highlights sections of code not covered by tests from Istanbul's JSON report.

Features

  • 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.

Install

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

Configuration

Preferences > IstanbulCoverage > Settings – User

  • coverage_on_load - Display coverage on load, defaults to False
  • coverage_local_path - This is a local path from the root of your Git project to your report .json file, defaults to coverage/coverage-final.json
  • uncovered_scope_name - Defaults to invalid.illegal
  • missing_branch_scope_name - Defaults to invalid.unimplemented

Usage

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" }
]

Packages

No packages published

Languages

  • Python 100.0%