@rarible/logger
Advanced tools
Comparing version 0.10.0-alpha.0 to 0.10.0-alpha.1
@@ -31,9 +31,12 @@ "use strict"; | ||
expect(calls).toEqual(1); | ||
expect(result).toStrictEqual([{ | ||
expect(result).toStrictEqual([ | ||
{ | ||
level: "INFO", | ||
message: " \"test\", {\"name\":\"Ivan\",\"isCreator\":true}", | ||
}, { | ||
message: ' "test", {"name":"Ivan","isCreator":true}', | ||
}, | ||
{ | ||
level: "ERROR", | ||
message: " Error: My new error, {\"name\":\"Ivan\",\"isCreator\":true}", | ||
}]); | ||
message: ' Error: My new error, {"name":"Ivan","isCreator":true}', | ||
}, | ||
]); | ||
return [2 /*return*/]; | ||
@@ -64,6 +67,8 @@ } | ||
expect(calls).toEqual(1); | ||
expect(result).toStrictEqual([{ | ||
expect(result).toStrictEqual([ | ||
{ | ||
level: "INFO", | ||
message: "test raw", | ||
}]); | ||
}, | ||
]); | ||
return [2 /*return*/]; | ||
@@ -85,5 +90,7 @@ } | ||
initialContext: new Promise(function (resolve) { | ||
setTimeout(function () { return resolve({ | ||
date: "today", | ||
}); }, 100); | ||
setTimeout(function () { | ||
return resolve({ | ||
date: "today", | ||
}); | ||
}, 100); | ||
}), | ||
@@ -103,8 +110,10 @@ }); | ||
expect(calls).toEqual(1); | ||
expect(result).toStrictEqual([{ | ||
expect(result).toStrictEqual([ | ||
{ | ||
level: "INFO", | ||
message: " \"test\", {\"name\":\"Ivan\",\"isCreator\":true}", | ||
message: ' "test", {"name":"Ivan","isCreator":true}', | ||
date: "today", | ||
version: "1", | ||
}]); | ||
}, | ||
]); | ||
return [2 /*return*/]; | ||
@@ -111,0 +120,0 @@ } |
@@ -14,5 +14,3 @@ "use strict"; | ||
return 0; | ||
return Object | ||
.keys(value) | ||
.reduce(function (total, key) { return sizeOf(key) + sizeOf(value[key]) + total; }, 0); | ||
return Object.keys(value).reduce(function (total, key) { return sizeOf(key) + sizeOf(value[key]) + total; }, 0); | ||
} | ||
@@ -19,0 +17,0 @@ return 0; |
{ | ||
"name": "@rarible/logger", | ||
"version": "0.10.0-alpha.0", | ||
"version": "0.10.0-alpha.1", | ||
"private": false, | ||
@@ -42,3 +42,3 @@ "description": "Logging utility for ts projects", | ||
}, | ||
"gitHead": "cf8991ba75fcbd09c8a423cc1ddeab172348fd49" | ||
"gitHead": "4db59b352e3e4e4bb12833d964087006dc9e4d81" | ||
} |
Sorry, the diff of this file is not supported yet
643
55562