1 | ## Included in this directory
|
2 |
|
3 | - index.html - the web page used to run the test suite.
|
4 |
|
5 | - spec - includes the OpenLayers test/spec files.
|
6 |
|
7 | - test-extensions.js - includes OpenLayers-specific extensions to the
|
8 | testing frameworks.
|
9 |
|
10 |
|
11 | ## Run the test suite
|
12 |
|
13 | Install the test dependencies (from the root of the repository):
|
14 |
|
15 | npm install
|
16 |
|
17 | Run the tests once with PhantomJS:
|
18 |
|
19 | make test
|
20 |
|
21 | (Note that for `npm` users, this can also be run as `npm test`.)
|
22 |
|
23 | Run the tests in a browser:
|
24 |
|
25 | make serve
|
26 |
|
27 | (Again for `npm` users, this is `npm start`.)
|
28 |
|
29 | Now visit http://localhost:3000/test/ in your browser. The tests will re-run
|
30 | any time one of the source or spec files changes.
|
31 |
|
32 | Tip for TDD'ers: to make PhantomJS run the test suite continuously each time
|
33 | a spec file is changed you can use nosier (http://pypi.python.org/pypi/nosier)
|
34 | and do `nosier -p test -p src "make test"`.
|