From: Kevin Ball Date: Thu, 20 Apr 2017 21:02:45 +0000 (-0700) Subject: Try putting a timeout before checking on test that's flaking on travis X-Git-Tag: v6.4.0-rc1~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9974%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Try putting a timeout before checking on test that's flaking on travis --- diff --git a/test/javascript/components/accordionMenu.js b/test/javascript/components/accordionMenu.js index 140ee2770..d2b57796d 100644 --- a/test/javascript/components/accordionMenu.js +++ b/test/javascript/components/accordionMenu.js @@ -45,7 +45,7 @@ describe('Accordion Menu', function() { }); describe('up()', function() { - it('closes the targeted submenu', function() { + it('closes the targeted submenu', function(done) { $html = $(template).appendTo('body'); plugin = new Foundation.AccordionMenu($html); @@ -53,7 +53,10 @@ describe('Accordion Menu', function() { plugin.down($html.find('.is-accordion-submenu').eq(0)); plugin.up($html.find('.is-accordion-submenu').eq(0)); - $html.find('.is-accordion-submenu').eq(0).should.be.hidden; + setTimeout(() => { + $html.find('.is-accordion-submenu').eq(0).should.be.hidden; + done(); + }, 1); }); it('toggles attributes of title of the targeted container', function() { @@ -172,4 +175,4 @@ describe('Accordion Menu', function() { }); }); -}); \ No newline at end of file +});