Skip to content

Commit

Permalink
Fix intermittent tests by cleaning up after each
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotranchino committed Sep 23, 2024
1 parent 8d407e8 commit 9b7c06d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/javascripts/table-of-contents-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ describe('Table of contents', function () {

afterEach(function () {
// clear up any classes left on <html>
$html.removeClass('.toc-open')
$html.removeClass('toc-open')
$html.find('body #toc-heading').remove()
$html.find('body .toc').remove()
if ($tocStickyHeader && $tocStickyHeader.length) {
$tocStickyHeader.remove()
}
})

describe('when the module is started', function () {
Expand Down

0 comments on commit 9b7c06d

Please sign in to comment.