Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit db78aa1

Browse files
committed
test(jqLite): add test for mass assignment to style
1 parent 986608f commit db78aa1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/jqLiteSpec.js

+13
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,19 @@ describe('jqLite', function(){
266266
expect(jqLite(a).css('prop')).toBeFalsy();
267267
expect(jqLite(b).css('prop')).toBeFalsy();
268268
});
269+
270+
271+
it('should set a bunch of css properties specified via an object', function() {
272+
expect(jqLite(a).css('foo')).toBeFalsy();
273+
expect(jqLite(a).css('bar')).toBeFalsy();
274+
expect(jqLite(a).css('baz')).toBeFalsy();
275+
276+
jqLite(a).css({'foo': 'a', 'bar': 'b', 'baz': ''});
277+
278+
expect(jqLite(a).css('foo')).toBe('a');
279+
expect(jqLite(a).css('bar')).toBe('b');
280+
expect(jqLite(a).css('baz')).toBeFalsy();
281+
});
269282
});
270283

271284

0 commit comments

Comments
 (0)