add: Util.timecode static function

This commit is contained in:
lancegin
2017-06-30 10:58:37 +08:00
parent 6b4db177d7
commit 9a2d5da7ef
2 changed files with 31 additions and 1 deletions
+8 -1
View File
@@ -31,6 +31,13 @@ describe('Util module test', function() {
let input = 49957590;
assert.equal("\u0000\u0000\u0000\u0000\u0002úJÖ", a.int_to_bytestring(input));
});
});
});
describe('static timecode() function', function() {
it("should format the time string to int", function() {
let now = new Date();
assert.equal("number", typeof(a.timecode(now, 30)));
});
});
});