Movatterモバイル変換


[0]ホーム

URL:


JavaScript test coverage made simple.

How Istanbul works

Istanbul instruments your ES5 and ES2015+ JavaScript code with line counters,so that you can track how well your unit-tests exercise your codebase.

Thenyc command-line-client for Istanbulworks well with most JavaScript testing frameworks:tap,mocha,AVA,etc.

#Features

  • First class support of ES6/ES2015+ usingbabel-plugin-istanbul.
  • A collection of reporters, providing both terminal and HTML output:terminal outputbrowser output
  • Support for the most popular JavaScript testing frameworks (see ourtutorials).
  • Support for instrumenting subprocesses, using the nyc command-line-interface.

Quick Start

Adding coverage to your mocha tests could not be easier

$ npm install --save-dev nyc

Now, simply place the commandnyc in front of your existing test command, for example:

{"scripts": {"test":"nyc mocha"  }}

[8]ページ先頭

©2009-2025 Movatter.jp