Coder Social home page Coder Social logo

jrjohnson / javascript-test-reporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codeclimate/javascript-test-reporter

0.0 2.0 0.0 118 KB

Code Climate test reporter client for JavaScript projects

Home Page: https://codeclimate.com

License: MIT License

JavaScript 100.00%

javascript-test-reporter's Introduction

codeclimate-test-reporter

Code Climate Test Coverage

Supplies a script which accepts lcov data over standard input, formats the coverage data and sends it to Code Climate.

Code Climate - https://codeclimate.com

Important FYIs

Across the many different testing frameworks, setups, and environments, there are lots of variables at play. Before setting up test coverage, it's important to understand what we do and do not currently support:

  • Default branch only: We only support test coverage for your default branch. Be sure to check out this branch before running your tests.

  • Single payload: We currently only support a single test coverage payload per commit. If you run your tests in multiple steps, or via parallel tests, Code Climate will only process the first payload that we receive. If you are using a CI, be sure to check if you are running your tests in a parallel mode.

    Note: There is one exception to this rule. We've specifically built an integration with Solano Labs to support parallel tests.

    Note: If you've configured Code Climate to analyze multiple languages in the same repository (e.g., Ruby and JavaScript), we can nonetheless only process test coverage information for one of these languages. We'll process the first payload that we receive.

  • Invalid File Paths: By default, our test reporters expect your application to exist at the root of your repository. If this is not the case, the file paths in your test coverage payload will not match the file paths that Code Climate expects.

Installation

This npm package requires having a user (but not necessarily a paid account) on Code Climate, so if you don't have one the first step is to create an account at: https://codeclimate.com. Then:

  1. Generate coverage data in lcov format

    Lcov data can be generated by a number of JavaScript code coverage tools, including Istanbul.

  2. Install codeclimate's NPM package

       $ npm install -g codeclimate-test-reporter
    
  3. Specifying your repo token as an environment variable, send lcov coverage data to the codeclimate npm script.

    For example, if your coverage data resides in a "lcov.info" file:

       CODECLIMATE_REPO_TOKEN=ABCD11110000000 codeclimate < lcov.info
    

The CODECLIMATE_REPO_TOKEN value is provided after you add your repo to your Code Climate account by clicking on "Setup Test Coverage" on the right hand side of your feed.

Please contact [email protected] if you need any assistance setting this up.

Troubleshooting

If you're having trouble setting up or working with our test coverage feature, see our detailed help doc, which covers the most common issues encountered.

Contributions

Patches, bug fixes, feature requests, and pull requests are welcome on the GitHub page for this project: https://github.com/codeclimate/javascript-test-reporter

Copyright

See LICENSE.txt

javascript-test-reporter's People

Contributors

brandonaaskov avatar faceleg avatar jeffrafter avatar jonathancadepowers avatar noahd1 avatar paed01 avatar sh19910711 avatar yoshuawuyts avatar

Watchers

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