From 1840ea6fd7d4bfcdfc3f5e09a8449cd62a09abc3 Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 21 Feb 2015 21:16:03 +0100 Subject: [PATCH] test info in README, add verbose test option --- README.md | 18 +++++++++++++++++- test/test.js | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e74ed9..e79f7ba 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,20 @@ Please [visit the website](https://crafatar.com) for details. * `npm install` * Start `redis-server` * `npm start` -* Access [http://localhost:3000](http://localhost:3000) \ No newline at end of file +* 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 +``` \ No newline at end of file diff --git a/test/test.js b/test/test.js index 1e2d99b..674bfdb 100644 --- a/test/test.js +++ b/test/test.js @@ -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/);