Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ankara-coverage

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ankara-coverage

Code coverage tool leveraging babylon to cover es6/es7 and strawman proposals

  • 0.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ankara

GitHub license Build Status Dependency Status devDependency Status npm version

Code coverage tool leveraging babylon to cover es6/es7 and strawman proposals.

Usage

Installation

Install as npm package:

npm install ankara-coverage --save-dev

Configuration

ankara is reading its configuration from an optional '.ankara.json' file in your project root.

{
  "extensions": [
    ".js"
  ],
  "files": [
    "path/to/main.js"
  ],
  "excludes": [
    "**/node_modules/**"
  ]
}
  • The extensions key are all valid file types which should be covered.
  • The files key should contain the main application/library entry points. This is only requried if the ankara instrument binary is used.
  • The excludes key should contain all sources not covered. This defaults to '**/node_modules/**'

Execution

To create an lcov coverage report the easiest method is to create a wrapper script which executes the test. Then call this script with the ankara cover command.

./node_modules/.bin/ankara cover <script-to-run-your-tests>

Optionally one can use two steps.

First instrumenting your code:

./node_modules/.bin/ankara instrument

Then execute your tests with the covered sources.

Second generating lcov report:

./node_modules/.bin/ankara lcov

The instrumentation step could be done automatically with the provided require hook. Just import (or require) the register file from ankara.

import 'ankara/dist/register';

Note: The register task is compatible with other register tasks but must be required as last step. This will then replace the previous registered tasks and execute them after instrumentation (e.g. babeljs/register).

FAQs

Package last updated on 29 Oct 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc