mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
get rid of some test log spam
This commit is contained in:
parent
688a34029c
commit
1d9176711f
15
test/test.js
15
test/test.js
@ -1,8 +1,14 @@
|
|||||||
/* globals describe, it, before, after */
|
/* globals describe, it, before, after */
|
||||||
/* eslint no-loop-func:0 guard-for-in:0 */
|
/* eslint no-loop-func:0 guard-for-in:0 */
|
||||||
|
|
||||||
|
// no spam
|
||||||
|
var logging = require("../lib/logging");
|
||||||
|
if (process.env.VERBOSE_TEST !== "true" && process.env.TRAVIS !== "true") {
|
||||||
|
logging.log = logging.debug = logging.warn = logging.error = function() {};
|
||||||
|
}
|
||||||
|
|
||||||
var networking = require("../lib/networking");
|
var networking = require("../lib/networking");
|
||||||
var helpers = require("../lib/helpers");
|
var helpers = require("../lib/helpers");
|
||||||
var logging = require("../lib/logging");
|
|
||||||
var cleaner = require("../lib/cleaner");
|
var cleaner = require("../lib/cleaner");
|
||||||
var request = require("request");
|
var request = require("request");
|
||||||
var config = require("../config");
|
var config = require("../config");
|
||||||
@ -16,11 +22,6 @@ var fs = require("fs");
|
|||||||
// we don't want tests to fail because of slow internet
|
// we don't want tests to fail because of slow internet
|
||||||
config.server.http_timeout *= 3;
|
config.server.http_timeout *= 3;
|
||||||
|
|
||||||
// no spam
|
|
||||||
if (process.env.VERBOSE_TEST !== "true" && process.env.TRAVIS !== "true") {
|
|
||||||
logging.log = logging.debug = logging.warn = logging.error = function() {};
|
|
||||||
}
|
|
||||||
|
|
||||||
var uuids = fs.readFileSync("test/uuids.txt").toString().split(/\r?\n/);
|
var uuids = fs.readFileSync("test/uuids.txt").toString().split(/\r?\n/);
|
||||||
var names = fs.readFileSync("test/usernames.txt").toString().split(/\r?\n/);
|
var names = fs.readFileSync("test/usernames.txt").toString().split(/\r?\n/);
|
||||||
|
|
||||||
@ -954,7 +955,7 @@ describe("Crafatar", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
if (id.length > 16) {
|
if (id.length > 16) {
|
||||||
console.log("can't run 'checked' test due to Mojang's rate limits :(");
|
// can't run 'checked' test due to Mojang's rate limits :(
|
||||||
} else {
|
} else {
|
||||||
it("should be checked", function(done) {
|
it("should be checked", function(done) {
|
||||||
var original_cache_time = config.caching.local;
|
var original_cache_time = config.caching.local;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user