Skip to content

Removed unnecessary console.log #7

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
},

displayRevisions: function(context) {
console.log(context.revisions);
if(!context.revisions) {
this.log("Could not display latest revisions because no revisions were found in context.", {color: 'yellow'});
return;
Expand Down Expand Up @@ -62,7 +61,7 @@ module.exports = {
row += " ";
}
if(key !== lastKey) {
row += "|"
row += "|";
}
});

Expand All @@ -83,7 +82,7 @@ module.exports = {
}.bind(this));
return presentKeys;
},
_displayHeader: function(keys, revisions) {
_displayHeader: function(keys) {
var keyHeader = " ";
var lastKey = keys[keys.length - 1];

Expand All @@ -98,7 +97,7 @@ module.exports = {

// revision hash needs an unknown amount of space, don't display closing |
if(key !== lastKey) {
keyHeader += "|"
keyHeader += "|";
}
});
this.log(keyHeader);
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/index-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ describe('displayRevisions plugin', function() {

it('transforms timestamps to human-readable dates (YYYY/MM/DD HH:mm:ss)', function() {
plugin.displayRevisions(context);
var utcOffset = moment().utcOffset();
var expectedFormat = ('YYYY/MM/DD HH:mm:ss');
var expectedDate = moment(1438232435000).utcOffset(utcOffset).format(expectedFormat);
var expectedDate = moment(1438232435000).format(expectedFormat);

var messages = mockUi.messages.reduce(function(previous, current) {
if (current.indexOf(expectedDate) !== -1) {
Expand Down