aboutsummaryrefslogtreecommitdiffstats
path: root/test/jqLiteSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/jqLiteSpec.js')
-rw-r--r--test/jqLiteSpec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js
index 79c0d0c6..e6e3a2ac 100644
--- a/test/jqLiteSpec.js
+++ b/test/jqLiteSpec.js
@@ -479,6 +479,20 @@ describe('jqLite', function() {
describe('class', function() {
+ it('should properly do with SVG elements', function() {
+ // this is a jqLite & SVG only test (jquery doesn't behave this way right now, which is a bug)
+ if (!window.SVGElement || !_jqLiteMode) return;
+ var svg = jqLite('<svg><rect></rect></svg>');
+ var rect = svg.children();
+
+ expect(rect.hasClass('foo-class')).toBe(false);
+ rect.addClass('foo-class');
+ expect(rect.hasClass('foo-class')).toBe(true);
+ rect.removeClass('foo-class');
+ expect(rect.hasClass('foo-class')).toBe(false);
+ });
+
+
describe('hasClass', function() {
it('should check class', function() {
var selector = jqLite([a, b]);