Code Monkey home page Code Monkey logo

rockford's Introduction

Rockford

Rockford is a tool that calculates DbC code coverage for clients using simple-assert. It is a very basic tool. It assumes that you are going to play nicely with it, and not try to trick or confuse it. The central algorithm counts functions and instances of pre and post callees inside those functions. Once it has these counts it will compare, at file and file collection levels, the number of pre and post callees with the number of functions. It doesn't check to see whether or not you've doubled up pre or post conditions, or any other jankiness. It assumes you will be a good citizen.

At the proverbial some point, Rockford may be improved to be a bit more persnicketty, particular, and specific.

  • Rockford uses Esprima for JavaScript parsing.
  • Rockford uses Estraverse to navigate the AST returned by Esprima.

Installation, Configuration, and Usage

$ npm install rockford -D

You should then setup a .rockford-file config in the root of your application. The config takes two params:

{
 "glob": "test/*.js", // A glob, or array of globs of files to analyze
 "sanityLevel": 0.8 // A decimal representing what determines a sane level of coverage
}

After that, the easiest way to run Rockford is as a script from your package.json:

"scripts": {
  "coverage": "rockford"
}

Filing Issues

Before filing an issue, please be sure to read the existing list of issues, to avoid submitting duplicates.

License

MIT

rockford's People

Contributors

joe-crick-blacklane avatar

Forkers

funky0leary

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.