diff --git a/spec/javascripts/table-of-contents-spec.js b/spec/javascripts/table-of-contents-spec.js index 0e398557..277d32dc 100644 --- a/spec/javascripts/table-of-contents-spec.js +++ b/spec/javascripts/table-of-contents-spec.js @@ -68,9 +68,12 @@ describe('Table of contents', function () { afterEach(function () { // clear up any classes left on - $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 () {