Pull request Compare This branch is 1765 commits behind processing-js:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


 === AUTOMATED TESTINTG ===========================

 1. Setup and Install
 2. Running Tests
 3. Reference

 1 --- SETUP AND INSTALL --------------------------

  Processing.js automated tests rely on a working JavaScript Shell.
  The easiest way to do this is to build one from source.  First you
  will need a working Mozilla build environment:


  Next, obtain the Firefox source code:

    $ hg clone http://hg.mozilla.org/mozilla-central

  Now configure and build the source (NOTE: use the appropriate
  autoconf v 2.13 for your system, autoconf213, autoconf-2.13, etc.):

    $ cd mozilla-central/js/src
    $ autoconf213
    $ mkdir opt-build
    $ ../configure --disable-debug --enable-optimize
    $ make

  This should produce a working JavaScript Shell at:


  Create an environment variable called JSSHELL that points to your 
  new JavaScript shell executable.

  For Example, in unix, edit your ~/.profile, ~/.bashrc, or ~/.bash_profile
  and add the following

    export JSSHELL=/home/user/mozilla-central/objdir-release/dist/bin/js

 2 --- RUNNING TESTS ------------------------------

  Once you have a working JS Shell, you can run tests and do other
  tasks like so:

  1) Run all tests (unit, parser):

     $ make check

  2) Run only parser tests:

     $ make check-parser

  3) Run only unit tests:

     $ make check-unit

  4) Run only one test, or tests under a particular dir:

     $ make check-one TEST=/path/to/single/test.js


     $ make check-one TEST=/path/to/dir/with/tests

  5) Parse a Processing file into JavaScript:

     $ make /path/to/processing-pde-file.js

     For example, given /tmp/foo.pde (note the extension):

     $ make /tmp/foo.js

  6) Create a release:

     $ make release

  7) Clean out old release:

     $ make clean

  8) Check Processing.js for errors (jslint):

     $ make check-lint

 3 --- REFERENCES ------------------------------

  See https://processing-js.lighthouseapp.com/projects/41284/writing-automated-tests
  for further documentation on testing and writing proper tests.