Skip to content

Commit 50bd705

Browse files
test(ngStyle): should cope with both '' and '0px' for initial height
1 parent 36fd167 commit 50bd705

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/ng/directive/ngStyleSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ describe('ngStyle', function() {
2323
}));
2424

2525

26-
it('should support lazy one-time binding for object literals', inject(function($rootScope, $compile) {
26+
it('should support lazy one-time binding for object literals', inject(function($rootScope, $compile, $log) {
2727
element = $compile('<div ng-style="::{height: heightStr}"></div>')($rootScope);
2828
$rootScope.$digest();
29-
expect(element.css('height')).toBeFalsy();
29+
expect(parseInt(element.css('height') + 0)).toEqual(0); // height could be '' or '0px'
3030
$rootScope.$apply('heightStr = "40px"');
3131
expect(element.css('height')).toBe('40px');
3232
}));

0 commit comments

Comments
 (0)