Giter Club home page Giter Club logo

koala-t's Introduction

koala-t

Build Status

Tool for checking code quality and for use in continuous integration.

koala-t will

  • lint your files using JSHint
  • run your unit tests
  • check code coverage

and pass your build if all requirements are met.

Install

With npm

$ npm install koala-t -g

you can then use koala-t to test your projects locally

Adding to CI

Travis

In your package.json file add the following:

"scripts": {
  "test": "koala-t"
},

"devDependencies": {
  "koala-t": "latest"
}

Jenkins

In your ci_build script run koala-t

koala-t -q

koala.json

koala.json is an important file that should be located in your project's root. This JSON config file defines which files will be linted, tested and if coverage will be used.

A sample koala.json can be found in this repository since koala-t runs koala-t on itself.

The basic configuration looks like this:

{
  "lint": ["lib/"],
  "test": ["test/my_test.js"]
}

This configuration will lint all .js files in the lib/ folder and will use the test runner in the file test/my_test.js.

CLI Help

Usage: koala-t [options]

Options:

  -h, --help                 output usage information
  -c, --coverage [file]      Instrument a file for coverage
  -l, --lint [file|dir]      Lint specific file or directory
  -p, --percentage [number]  The amount of code coverage required to pass
  -q, --quiet                Keep things quiet.
  -t, --test [file|dir]      Test specific file or directory

License

MIT LICENSE

Copyright 2012 Josh Perez, www.goatslacker.com

koala-t's People

Contributors

goatslacker avatar

Stargazers

node-migrator-bot avatar Ryan Dick avatar thinkphper avatar Nicolas Chambrier avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

koala-t's Issues

Vague error.

»fixmyjs(master) ☠ koala-t

/usr/local/lib/node_modules/koala-t/lib/test.js:13
exported(cb);
^
TypeError: object is not a function
at Object.CALL_NON_FUNCTION (native)
at test (/usr/local/lib/node_modules/koala-t/lib/test.js:13:3)
at /usr/local/lib/node_modules/koala-t/koala.js:77:9
at /usr/local/lib/node_modules/koala-t/lib/utils/parallel.js:37:5
at Array.forEach (native)
at parallel (/usr/local/lib/node_modules/koala-t/lib/utils/parallel.js:36:9)
at Tasks.run (/usr/local/lib/node_modules/koala-t/lib/tasks.js:21:3)
at EventEmitter. (/usr/local/lib/node_modules/koala-t/koala.js:83:11)
at EventEmitter.emit (events.js:64:17)
at Object.oncomplete (/usr/local/lib/node_modules/koala-t/lib/find.js:80:15)

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.