Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "usage", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "simple way to lookup linux process usage", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -8,7 +8,7 @@ var usage = require('../'); | ||
usage.lookup(1232323, function(err) { | ||
usage.lookup(1232323, _usageCallback(done, function(err) { | ||
assert.ok(err); | ||
assert.ok(err.code, 'INVALID_PID'); | ||
done(); | ||
}); | ||
})); | ||
}); | ||
@@ -18,3 +18,3 @@ | ||
usage.lookup(process.pid, function(err, result) { | ||
usage.lookup(process.pid, _usageCallback(done, function(err, result) { | ||
@@ -25,4 +25,18 @@ assert.equal(err, null); | ||
done(); | ||
}); | ||
})); | ||
}); | ||
}); | ||
}); | ||
function _usageCallback(done, calback) { | ||
return function(err, result) { | ||
if(err && err.code == 'PLATFORM_NOT_SUPPORTED') { | ||
console.log(err.code); | ||
done(); | ||
} else { | ||
calback(err, result); | ||
} | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
499701
88
50