angular.js
angular.js copied to clipboard
Missing testing function in ngClassSpec
I find there are two unit test in ngClassSpec.js do not have any test function
it('should remove classes even if they were added by another code', inject(function($rootScope, $compile) {
element = $compile('<div ng-class="dynCls"></div>')($rootScope);
$rootScope.dynCls = 'foo';
$rootScope.$digest();
element.addClass('foo');
$rootScope.dynCls = '';
$rootScope.$digest();
}));
it('should convert undefined and null values to an empty string', inject(function($rootScope, $compile) {
element = $compile('<div ng-class="dynCls"></div>')($rootScope);
$rootScope.dynCls = [undefined, null];
$rootScope.$digest();
}));
Are they deliberate or just forget to add?
Good spot @mofas . Do you think you could knock up a PR to improve these two cases?
I’d mentioned these when I wrote the ngAttr directive for fun — I think the assumption was that the tests were failing or something, and not using xit/xdescribe.
Caitlin Potter [email protected]
On Dec 5, 2013, at 8:44 AM, Pete Bacon Darwin [email protected] wrote:
Good spot @mofas . Do you think you could knock up a PR to improve these two cases?
— Reply to this email directly or view it on GitHub.