Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 3.48 KB

CONTRIBUTING.md

File metadata and controls

100 lines (81 loc) · 3.48 KB

How to contribute

If you are thinking about making Testacular better, or you just want to hack on it, that’s great! Here are some tips to get you started.

Getting Started

  • Make sure you have a GitHub account
  • Consider submiting a ticket for your issue, assuming one does not already exist.
    • Clearly describe the issue including steps to reproduce when it is a bug.
    • Make sure you fill in the earliest version that you know has the issue.
    • For smaller tweaks and fixes that you plan to fix yourself and merge back soon, you may skip this step. When you submit your pull request, it will serve as your issue.
  • Fork the repository on GitHub

Initial setup

  • Clone your fork. For these instructions, we assume you cloned into '~/github/testacular'.

  • Install dependencies:

    $ cd ~/github/testacular
    # install local dependencies
    $ npm install
    
    # install global dependencies
    $ npm install grunt-cli -g
  • Ensure you have a stable working baseline for development.

    # This will run a full build and test pass.
    $ cd ~/github/testacular
    $ grunt

    On an unmodified 'master' branch, this command should always complete and report success.

    If 'grunt' fails:

  • Run 'grunt init-dev-env'. This will install a git commit trigger that will ensure your commit messages follows the [Testacular - Git Commit Msg Format Conventions] (https://docs.google.com/document/d/1JCFlkQ59Bx4qN1WKS1dtKXKl5G_lED6Lxey3iPNpQOs/pub).

Making and Submitting Changes

  • Checkout a new branch (usually based on master) and name it accordingly to what you intend to do
    • Features get the prefix feature-
    • Bug fixes get the prefix fix-
    • Improvements to the documentation get the prefix docs-
    • Use one branch per feature/fix
  • Make your changes
    • Follow node.js style guidelines (with exception of 100 characters per line)
    • Add tests for your changes as (or before) you make them, if at all possible. We use coffee script for our tests.
  • Commit your changes
  • Send a pull request to the master branch.
    • Before submitting, make sure the default 'grunt' command succeeds locally.
    • After submitting, Travis.ci will pick up your changes and report results.
    • Make fixes and incorporate feedback, as needed.

Build and Test Commands

The default task, just calling grunt, will run build jshint test. You may also run tasks separately.

Build the project:

$ grunt build

Lint the files:

$ grunt jshint

Run the tests:

# All tests
$ grunt test

# Separate test suites
$ grunt test:unit
$ grunt test:e2e
$ grunt test:client

Additional Resources