Files
openlayers/test
2014-07-06 11:53:34 -06:00
..
2013-06-01 18:16:43 +02:00
2014-07-01 14:09:28 -04:00
2014-07-06 11:47:58 -06:00
2014-07-06 11:53:34 -06:00

Included in this directory

  • index.html - the web page used to run the test suite.

  • spec - includes the OpenLayers test/spec files.

  • expect-0.2.0 - Minimalistic BDD-style assertion framework. https://github.com/LearnBoost/expect.js/

  • test-extensions.js - includes OpenLayers-specific extensions to the testing frameworks.

Run the test suite

Install the test dependencies (from the root of the repository):

npm install

Run the tests once with PhantomJS:

npm test

(This can also be run as ./build.py test.)

Run the tests in a browser:

npm start

Now visit http://localhost:3000/test/ in your browser. (This can also be run as ./build.py serve.) The tests will re-run any time one of the source or spec files changes.

Tip for TDD'ers: to make PhantomJS run the test suite continuously each time a spec file is changed you can use nosier (http://pypi.python.org/pypi/nosier) and do nosier -p test -p src "./build.py test".