Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

koala-t checks your node.js code for 'quality'

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 docs
Octocat-spinner-32 packages
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .jshintrc
Octocat-spinner-32 .npmignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Cakefile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 koala.json
Octocat-spinner-32 package.json
README.md

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

Something went wrong with that request. Please try again.