In the original .fields() implementation, extra is assigned to the input d while it should be an extending operation.
This should have been caught by the tests but somehow angular.extend() is not used correctly in the tests.
// incorrect
expectMessage = angular.extend(message, extra)
// this extends message, so extra is included in the message
// correct
expectMessage = angular.extend({}, message, extra)
// this does not change message
Coverage remained the same at 85.227% when pulling 3a84c03cc38d1a91b3d86faa93f3dab063e70ad8 on Charlie-Hua:develop into c33555323e1e95656308760f50ff35c759cd5c84 on ajbrown:develop.
In the original
.fields()
implementation,extra
is assigned to the inputd
while it should be an extending operation. This should have been caught by the tests but somehowangular.extend()
is not used correctly in the tests.reference: angular.extend