Testing WYMeditor

WYMeditor includes a full unit test suite to help us ensure that the editor works great across a variety of browsers. The test suite should pass in any of our supported browsers and if it doesn’t, please file a bug so we can fix it!

To run the test suite.

  1. Get a copy of the source using git:

    $ git clone git://github.com/wymeditor/wymeditor.git
    
  2. Put your source behind some kind of web server (apache, nginx, etc). If you don’t have one installed or don’t want to fuss with configuration, you can use python’s HTTP server:

    $ cd /path/to/my/wymeditor/src
    $ python -m SimpleHTTPServer
    
  3. The unit test suite is located at src/test/unit/index.html, so if you used the python instructions, open up your browser to http://localhost:8000/test/unit/index.html.

    All green means you’re good to go.

  4. Want to run the tests from the command line? You can do that to! Just install PhantomJS and then (if you used the http server from step 2) call:

    $ build/phantomjs_test.sh localhost:8000/test/unit
    

Testing Different jQuery Versions

The unit tests can be run with the different versions of jQuery hosted on Google’s CDN by appending the URL parameter ?jquery=<version>. For example, to test with jQuery 1.8.0 against a local server on port 8000:

http://localhost:8000/test/unit/?jquery=1.8.0.

Project Versions

Table Of Contents

Previous topic

Building WYMeditor

Next topic

WYMeditor Architecture

This Page