2011-10-05 23:49:54 +08:00
|
|
|
cartodb-sql-api tests
|
2012-06-02 03:46:38 +08:00
|
|
|
---------------------
|
2012-03-14 18:02:32 +08:00
|
|
|
Tests require you create a test database and set some redis keys before,
|
|
|
|
you can execute prepare_db.sh script, it will create database, users
|
2012-07-13 16:30:46 +08:00
|
|
|
and redis stuff for you. Be sure postgres and redis are running.
|
2011-10-05 23:49:54 +08:00
|
|
|
|
2011-10-05 23:58:26 +08:00
|
|
|
> cd test && ./prepare_db.sh
|
2011-10-05 23:49:54 +08:00
|
|
|
|
2012-07-13 16:30:46 +08:00
|
|
|
Note that "make check" from top-level dir will try to do everything
|
|
|
|
needed to prepare & run the tests.
|
|
|
|
|
2012-06-02 03:46:38 +08:00
|
|
|
|
|
|
|
Acceptance tests (need ctrl-C to exit)
|
|
|
|
--------------------------------------
|
2012-07-13 16:30:46 +08:00
|
|
|
> mocha -u tdd test/acceptance/app.test.js
|
|
|
|
> mocha -u tdd test/acceptance/app.auth.test.js
|
2012-06-02 03:46:38 +08:00
|
|
|
|
|
|
|
|
2012-07-13 16:30:46 +08:00
|
|
|
Unit tests
|
2012-06-02 04:19:02 +08:00
|
|
|
--------------------------------
|
2012-07-13 16:30:46 +08:00
|
|
|
> mocha -u tdd test/unit/*.js (or run the tests individually)
|