Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Process list should always work.

  • Loading branch information...
commit ae082bc2a5b714d666ec037912ba7c4fb8737412 1 parent 1d952f3
@tomas tomas authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 test/lib/agent/providers/processes.js
View
11 test/lib/agent/providers/processes.js
@@ -3,12 +3,9 @@ var helpers = require('./../../../helpers'),
provider = helpers.load('providers/processes');
var check_process = function(val) {
- val.should.be.an.instanceOf(Array);
- if (val.length > 0) {
- var x = val[0];
- var keys = 'status user ppid pid cpu mem time name'.split(' ');
- x.should.have.keys(keys);
- }
+ var obj = val[0];
+ var keys = 'status user ppid pid cpu mem time name'.split(' ');
+ obj.should.have.keys(keys);
};
describe('processes', function(){
@@ -16,6 +13,7 @@ describe('processes', function(){
describe('process_list', function() {
it('should be an array of process', function(done) {
provider.get_parent_process_list(function(err, val) {
+ should.not.exist(err);
check_process(val);
done();
});
@@ -25,6 +23,7 @@ describe('processes', function(){
describe('parent_process_list', function() {
it('should be an array of parent process', function(done) {
provider.get_parent_process_list(function(err, val) {
+ should.not.exist(err);
check_process(val);
done();
});
Please sign in to comment.
Something went wrong with that request. Please try again.