mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
Format
This commit is contained in:
parent
5a4306db6a
commit
242ea2df51
44
test/test.js
44
test/test.js
@ -31,10 +31,10 @@ function getRandomInt(min, max) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var ids = [
|
var ids = [
|
||||||
uuid.toLowerCase(),
|
uuid.toLowerCase(),
|
||||||
name.toLowerCase(),
|
name.toLowerCase(),
|
||||||
name.toUpperCase(),
|
name.toUpperCase(),
|
||||||
uuid.toUpperCase(),
|
uuid.toUpperCase(),
|
||||||
];
|
];
|
||||||
|
|
||||||
describe("Crafatar", function() {
|
describe("Crafatar", function() {
|
||||||
@ -45,8 +45,8 @@ describe("Crafatar", function() {
|
|||||||
cache.get_redis().flushall();
|
cache.get_redis().flushall();
|
||||||
// largest possible integers, cause I don't know
|
// largest possible integers, cause I don't know
|
||||||
// how big hard drives are these days
|
// how big hard drives are these days
|
||||||
config.cleaning_disk_limit = Math.pow(2,32) - 1;;
|
config.cleaning_disk_limit = Math.pow(2, 32) - 1;;
|
||||||
config.cleaning_redis_limit = Math.pow(2,32) - 1;;
|
config.cleaning_redis_limit = Math.pow(2, 32) - 1;;
|
||||||
cleaner.run();
|
cleaner.run();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ describe("Crafatar", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe("Avatar", function() {
|
describe("Avatar", function() {
|
||||||
// profile "Alex" - hoping it'll never have a skin
|
// profile "Alex" - hoping it'll never have a skin
|
||||||
var alex_uuid = "ec561538f3fd461daff5086b22154bce";
|
var alex_uuid = "ec561538f3fd461daff5086b22154bce";
|
||||||
// profile "Steven" (Steve doesn't exist) - hoping it'll never have a skin
|
// profile "Steven" (Steve doesn't exist) - hoping it'll never have a skin
|
||||||
@ -129,7 +129,7 @@ describe("Avatar", function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe("Errors", function() {
|
describe("Errors", function() {
|
||||||
it("should time out on uuid info download", function(done) {
|
it("should time out on uuid info download", function(done) {
|
||||||
var original_timeout = config.http_timeout;
|
var original_timeout = config.http_timeout;
|
||||||
config.http_timeout = 1;
|
config.http_timeout = 1;
|
||||||
@ -177,13 +177,9 @@ describe("Errors", function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Cleaner", function() {
|
describe("Server", function() {
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("Server", function() {
|
|
||||||
before(function(done) {
|
before(function(done) {
|
||||||
server.boot(function() {
|
server.boot(function() {
|
||||||
done();
|
done();
|
||||||
@ -403,16 +399,16 @@ describe("Server", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Networking: Skin", function() {
|
describe("Networking: Skin", function() {
|
||||||
it("should not fail (uuid)", function(done) {
|
it("should not fail (uuid)", function(done) {
|
||||||
helpers.get_skin(rid, id, function(err, hash, img) {
|
helpers.get_skin(rid, id, function(err, hash, img) {
|
||||||
assert.strictEqual(err, null);
|
assert.strictEqual(err, null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Networking: Render", function() {
|
describe("Networking: Render", function() {
|
||||||
it("should not fail (full body)", function(done) {
|
it("should not fail (full body)", function(done) {
|
||||||
helpers.get_render(rid, id, 6, true, true, function(err, hash, img) {
|
helpers.get_render(rid, id, 6, true, true, function(err, hash, img) {
|
||||||
assert.strictEqual(err, null);
|
assert.strictEqual(err, null);
|
||||||
@ -425,19 +421,19 @@ describe("Networking: Render", function() {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Networking: Cape", function() {
|
describe("Networking: Cape", function() {
|
||||||
it("should not fail (possible cape)", function(done) {
|
it("should not fail (possible cape)", function(done) {
|
||||||
helpers.get_cape(rid, id, function(err, hash, img) {
|
helpers.get_cape(rid, id, function(err, hash, img) {
|
||||||
assert.strictEqual(err, null);
|
assert.strictEqual(err, null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
describe("Errors", function() {
|
describe("Errors", function() {
|
||||||
before(function() {
|
before(function() {
|
||||||
cache.get_redis().flushall();
|
cache.get_redis().flushall();
|
||||||
});
|
});
|
||||||
@ -457,7 +453,7 @@ describe("Errors", function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(id, id_type);
|
})(id, id_type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user