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/);