forked from toji/gl-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HOW_TO_TEST.txt
39 lines (24 loc) · 1.23 KB
/
HOW_TO_TEST.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
The unit tests are built upon the following tools:
* Jasmine -- the underlying test suite which executes the test and reports feedback
* node.js -- used for testing at the command line, via the `jasmine-node` package
* selenium -- used for automated in-browser testing via Ruby
If Ruby is installed, you can set up with:
gem install bundler
bundle install
...and then test with:
rake
Hint: also look at
rake --tasks
If Ruby is not installed, you must test with `jasmine-node` directly:
NODE_PATH=$NODE_PATH:. \
node_modules/jasmine-node/bin/jasmine-node \
spec/node_helper.js
BENCHMARKING
If you poke around in the project source, you'll find the `spec/benchmarks` directory.
I've started placing benchmarks in there for posterity and as a reminder for why things
are coded the way they are. They're also there so that we can easily repeat benchmarks
going forward as the JavaScript VMs evolve, to make sure that gl-matrix stays fast.
There's no rake task for running benchmarks; you have to do it with Node. Here's the
syntax of the command:
NODE_PATH=$NODE_PATH:. node spec/benchmarks/name_of_benchmark.js
where `name_of_benchmark.js` is, obviously, the benchmark's filename.