alanning / meteor-velocity-quick-start

Quick start package that will add a few velocity-compatible test frameworks to your app
MIT License
9 stars 0 forks source link

meteor-velocity-quick-start

Quick start package that will add a few velocity-compatible test frameworks to your app.

Deprecated!

NOTE: This package is no longer needed. Check out https://velocity.readme.io/ for more information on testing your Meteor applications.

Test frameworks

These are the test frameworks that are included with this quick-start. Typically it is easiest to start with tests that run in-context like mocha-web-velocity or jasmine since they do not require any stubbing. Once ready, have a look at writing unit tests using jasmine-unit for even speedier execution.

Getting started

  1. Install nodejs

  2. Install meteor

    $ curl https://install.meteor.com/ | sh
  3. Install meteorite

    $ sudo -H npm install -g meteorite
  4. Create an app and add the quick-start

    $ cd ~/tmp
    $ meteor create --example leaderboard
    $ cd leaderboard
    $ mrt add velocity-quick-start
    $ meteor

    This will add the appropriate test frameworks, the html-reporter package, and copy sample tests into the tests directory.

    If you would like to see debug output for all the test frameworks, run this command instead:

    $ DEBUG=1 JASMINE_DEBUG=1 VELOCITY_DEBUG=1 meteor
  5. Check out the stubs and tests in the tests directory and add your own!

Removing sample tests

Meteor doesn't have a way to mark packages as 'run-once' so if you remove the sample tests, quick-start will add them back the next time the app runs. To avoid this, remove the quick-start package:

$ mrt remove velocity-quick-start

The test frameworks and velocity packages will remain.

How to add a new test framework to this quick-start

Got a velocity-compatible test framework? Add it to this quick-start and send a pull request!

Steps required to add a new test framework to velocity-quick-start:

  1. add to quick-start/smart.json
  2. add to quick-start/package.js
  3. add to quick-start/main.js