Skip to content

Commit

Permalink
[HTML search] Tests: cleanup: remove unused function-call arguments.
Browse files Browse the repository at this point in the history
(cherry picked from commit a7ba9e7)

Conflicts:
	tests/js/searchtools.js
  • Loading branch information
jayaddison committed Jul 20, 2024
1 parent 2bd973e commit 7219619
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/js/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,31 +40,27 @@ 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',
'',
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",
Expand All @@ -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);
});

});
Expand Down

0 comments on commit 7219619

Please sign in to comment.