check tag type

This commit is contained in:
Girish Ramakrishnan
2016-06-28 16:48:33 -05:00
parent 9bfbdbba3b
commit 4be3f484d0

View File

@@ -22,7 +22,7 @@ var progress = {
// We use -1 for percentage to indicate errors
function set(tag, percent, message) {
assert(tag === exports.UPDATE || tag === exports.BACKUP);
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof percent, 'number');
assert.strictEqual(typeof message, 'string');
@@ -35,7 +35,7 @@ function set(tag, percent, message) {
}
function clear(tag) {
assert(tag === exports.UPDATE || tag === exports.BACKUP);
assert.strictEqual(typeof tag, 'string');
progress[tag] = null;