Code Monkey home page Code Monkey logo

grunt-mocha-phantom-istanbul's Introduction

grunt-mocha-phantom-istanbul

Automatically run client-side mocha specs via grunt/mocha/PhantomJS and support tracking code coverage with istanbul.

This is a very slight modification of grunt-mocha which only adds the capability to extract istanbul coverage data, so see grunt-mocha for usage and options.

At this time, only the extraction capability is provided, so it is still dependent on the user to instrument the source files ahead of time with istanbul in order to actually have coverage data tracked when the tests are run.

Settings

See grunt-mocha for all additional options that it supports.

options.coverage

The options for this are specified in the coverage object.

options.coverage.jsonReport

Type: String Default: undefined

The folder to write a coverage.json file to, defaults to no report being generated.

options.coverage.htmlReport

Type: String default: undefined

Destination folder to write an HTML report to, defaults to no report being generated.

options.coverage.coberturaReport

Type: String default: undefined

Destination folder to write a cobertura-coverage.xml file to, defaults to no report being generated.

options.coverage.lcovReport

Type: String default: undefined

Destination folder to write a lcov.info file to, defaults to no report being generated.

options.coverage.cloverReport

Type: String default: undefined

Destination folder to write a clover.xml file to, defaults to no report being generated.

Example:

mocha: {
  test: {
    files: ['tests/**/*.html'],
    options: {
      coverage: {
        htmlReport: 'coverage/html'
      }
    }
  },
},

TODO

  • Add option to instrument the source files on the fly with istanbul so that pre-instrumenting with another task is no longer required.

License

Licensed under the MIT license.

grunt-mocha-phantom-istanbul's People

Contributors

kmiyashiro avatar scotthogan avatar tony avatar sessio avatar byk avatar bartvds avatar puigcerber avatar rohni avatar sindresorhus avatar gamtiq avatar jonnyreeves avatar e7h4n avatar naganowl avatar ambar avatar studiomohawk avatar sboudrias avatar rmurphey avatar rayshih avatar paulirish avatar nschonni avatar michaelxavier avatar iammerrick avatar vseventer avatar lemieux avatar bitwiseman avatar juriejan avatar jonotron avatar pangratz avatar chrisabrams avatar bmac avatar

Watchers

James Cloos avatar Gethin Webster avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.