mock-browser
Advanced tools
Comparing version 0.90.26 to 0.90.27
@@ -48,2 +48,4 @@ /** | ||
var clist = this; | ||
var getList = function() { | ||
@@ -78,9 +80,7 @@ return elem.className.split(' '); | ||
if (list.indexOf( cname ) < 0) { | ||
list.push( cname ); | ||
clist.add( cname ); | ||
} else { | ||
dash.remove( list, cname ); | ||
clist.remove( cname ); | ||
} | ||
elem.className = list.join(' ' ).trim(); | ||
return list.indexOf( cname ) >= 0; | ||
@@ -87,0 +87,0 @@ }; |
{ | ||
"name": "mock-browser", | ||
"version": "0.90.26", | ||
"version": "0.90.27", | ||
"description": "A mock browser with window, document, location, navigation, local and session storage to use for client side code tests in a node environment.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -149,2 +149,2 @@ #Mock Browser | ||
- - - | ||
<p><small><em>copyright © 2014 rain city software | version 0.90.26</em></small></p> | ||
<p><small><em>copyright © 2014 rain city software | version 0.90.27</em></small></p> |
@@ -118,2 +118,13 @@ /** | ||
}); | ||
it('should toggle class on and off', function() { | ||
var element = document.createElement('div' ), | ||
cname = 'flarb'; | ||
element.className.should.equal( '' ); | ||
element.classList.toggle( cname ); | ||
element.className.should.equal( cname ); | ||
element.classList.toggle( cname ); | ||
element.className.should.equal( '' ); | ||
}); | ||
}); | ||
@@ -120,0 +131,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25150
512