Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTML search] Tests: cleanup: remove unused function-call arguments. #12628

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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