mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
test(jqLite): add test for mass assignment to style
This commit is contained in:
@@ -266,6 +266,19 @@ describe('jqLite', function(){
|
||||
expect(jqLite(a).css('prop')).toBeFalsy();
|
||||
expect(jqLite(b).css('prop')).toBeFalsy();
|
||||
});
|
||||
|
||||
|
||||
it('should set a bunch of css properties specified via an object', function() {
|
||||
expect(jqLite(a).css('foo')).toBeFalsy();
|
||||
expect(jqLite(a).css('bar')).toBeFalsy();
|
||||
expect(jqLite(a).css('baz')).toBeFalsy();
|
||||
|
||||
jqLite(a).css({'foo': 'a', 'bar': 'b', 'baz': ''});
|
||||
|
||||
expect(jqLite(a).css('foo')).toBe('a');
|
||||
expect(jqLite(a).css('bar')).toBe('b');
|
||||
expect(jqLite(a).css('baz')).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user