Skip to content

Commit

Permalink
Merge pull request #155 from sandersky/master
Browse files Browse the repository at this point in the history
Stop using _.pluck() since it doesn't work with lodash 4.x
  • Loading branch information
sglanzer authored Aug 2, 2016
2 parents 77e9c66 + 8c1930b commit 782830b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/reporters/json-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var percentage = function(number, total) {


function totalProperty(fileData, propName) {
return _(fileData).pluck(propName).reduce(function(memo, value) {
return _(fileData).map(propName).reduce(function(memo, value) {
return memo + value;
}, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/teamcity-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var percentage = function(number, total) {


function totalProperty(fileData, propName) {
return _(fileData).pluck(propName).reduce(function(memo, value) {
return _(fileData).map(propName).reduce(function(memo, value) {
return memo + value;
}, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-cli-blanket",
"version": "0.9.7",
"version": "0.9.8",
"description": "Blanket code coverage for ember-cli",
"main": "index.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/coverage-middleware-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ describe('coverage middleware', function() {
});

it('should instantiate all three reporters', function() {
var types = _.pluck(instances, 'type');
var types = _.map(instances, 'type');
expect(types).to.be.eql(['TeamCityReporter', 'JsonReporter', 'LcovReporter']);
});

it('should have called report on all three reporters', function() {
var reportedData = _.pluck(instances, 'reported');
var reportedData = _.map(instances, 'reported');
expect(reportedData).to.be.eql(['my-data', 'my-data', 'my-data']);
});
});

0 comments on commit 782830b

Please sign in to comment.