]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
chore: clean component after Toggler tests
authorNicolas Coden <nicolas@ncoden.fr>
Fri, 27 Apr 2018 22:01:10 +0000 (00:01 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Fri, 27 Apr 2018 22:01:10 +0000 (00:01 +0200)
test/javascript/components/toggler.js

index 7d90107950121e9b4f69084a35509a326bef268f..84a82a2972a9363dd60b8afff11f89f6be160899 100644 (file)
@@ -54,7 +54,6 @@ describe('Toggler', function() {
       plugin = new Foundation.Toggler($html, {});
 
       $triggers.find('[data-open], [data-close], [data-toggle]').should.have.attr('aria-controls', 'toggler');
-
       $triggers.remove();
     });
 
@@ -64,6 +63,7 @@ describe('Toggler', function() {
       plugin = new Foundation.Toggler($html, {});
 
       $triggers.find('[data-open], [data-close], [data-toggle]').should.have.attr('aria-expanded', 'true');
+      $triggers.remove();
     });
 
     it('sets aria-expanded to false if the element is invisible', function() {
@@ -73,6 +73,7 @@ describe('Toggler', function() {
       plugin = new Foundation.Toggler($html, {});
 
       $triggers.find('[data-open], [data-close], [data-toggle]').should.have.attr('aria-expanded', 'false');
+      $triggers.remove();
       $css.remove();
     });
   });
@@ -104,6 +105,8 @@ describe('Toggler', function() {
 
       plugin._toggleClass();
       $triggers.find('[data-open], [data-close], [data-toggle]').should.have.attr('aria-expanded', 'false');
+
+      $triggers.remove();
     });
   });