test info in README, add verbose test option

This commit is contained in:
jomo 2015-02-21 21:16:03 +01:00
parent 6b4fcb9aea
commit 1840ea6fd7
2 changed files with 20 additions and 2 deletions

View File

@ -45,3 +45,19 @@ Please [visit the website](https://crafatar.com) for details.
* Start `redis-server`
* `npm start`
* Access [http://localhost:3000](http://localhost:3000)
## Tests
```shell
npm test
```
If you want to debug failing tests, you can set the env
```shell
VERBOSE_TEST=true
```
To debug caching, it can be helpful to monitor redis commands while tests are running:
```shell
redis-cli monitor
```

View File

@ -15,7 +15,9 @@ var request = require("request");
config.http_timeout *= 3;
// no spam
//logging.log = function() {};
if (!process.env.VERBOSE_TEST !== "true") {
logging.log = function() {};
}
var uuids = fs.readFileSync("test/uuids.txt").toString().split(/\r?\n/);
var names = fs.readFileSync("test/usernames.txt").toString().split(/\r?\n/);