Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Training] Add unit test code for poller #497

Closed
wants to merge 4 commits into from
Closed

[Training] Add unit test code for poller #497

wants to merge 4 commits into from

Conversation

yaolingling
Copy link
Contributor

Background
Add unit test code for the new defined poller.

Result

  1. execute command "npm test" in on-tasks repo
    image

  2. code coverrage
    Execute following command to get coverage
    ./node_modules/.bin/istanbul cover -x "/spec/" ./node_modules/.bin/_mocha -- $(find spec -name '*-spec.js') --timeout 10000 -R xunit-file --require spec/helper.js
    original coverrage:
    image

latest code coverrage
Execute the command "git checkout add-unittest-poller" . Then execute following command to get coverage.
./node_modules/.bin/istanbul cover -x "/spec/" ./node_modules/.bin/_mocha -- $(find spec -name '*-spec.js') --timeout 10000 -R xunit-file --require spec/helper.js
image

Reviewers
@iceiilin @anhou

}


}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

}
PowerStatusAlertJob.prototype.determinePowerStatusAlert = function(){
var self = this;
self.powerStateAlerter(data.chassisPower.status, data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'data' is not defined.

assert,
Errors,
Promise,
_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'_' is defined but never used.

PowerStatusAlertJob.prototype.determinePowerStatusAlert = function(){
var self = this;
self.powerStateAlerter(data.chassisPower.status, data);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

self.determinePowerStatusAlert
);

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants