From 72196190e372c059d0106ab53573df8435e15f14 Mon Sep 17 00:00:00 2001 From: James Addison Date: Sat, 20 Jul 2024 12:46:04 +0100 Subject: [PATCH] [HTML search] Tests: cleanup: remove unused function-call arguments. (cherry picked from commit a7ba9e7d8b487a40f2bb7cae6d5c9b6b585d255a) Conflicts: tests/js/searchtools.js --- tests/js/searchtools.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/js/searchtools.js b/tests/js/searchtools.js index ebf37e56f23..c82c6f1f968 100644 --- a/tests/js/searchtools.js +++ b/tests/js/searchtools.js @@ -31,8 +31,6 @@ describe('Basic html theme search', function() { eval(loadFixture("cpp/searchindex.js")); [_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('C++'); - terms = Search._index.terms; - titleterms = Search._index.titleterms; hits = [[ "index", @@ -42,15 +40,13 @@ describe('Basic html theme search', function() { 5, "index.rst" ]]; - expect(Search.performTermsSearch(searchterms, excluded, terms, titleterms)).toEqual(hits); + expect(Search.performTermsSearch(searchterms, excluded)).toEqual(hits); }); it('should be able to search for multiple terms', function() { eval(loadFixture("multiterm/searchindex.js")); [_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('main page'); - terms = Search._index.terms; - titleterms = Search._index.titleterms; hits = [[ 'index', 'Main Page', @@ -58,15 +54,13 @@ describe('Basic html theme search', function() { null, 15, 'index.rst']]; - expect(Search.performTermsSearch(searchterms, excluded, terms, titleterms)).toEqual(hits); + expect(Search.performTermsSearch(searchterms, excluded)).toEqual(hits); }); it('should partially-match "sphinx" when in title index', function() { eval(loadFixture("partial/searchindex.js")); [_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('sphinx'); - terms = Search._index.terms; - titleterms = Search._index.titleterms; hits = [[ "index", @@ -76,7 +70,7 @@ describe('Basic html theme search', function() { 7, "index.rst" ]]; - expect(Search.performTermsSearch(searchterms, excluded, terms, titleterms)).toEqual(hits); + expect(Search.performTermsSearch(searchterms, excluded)).toEqual(hits); }); });