mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
HTML Search: Remove unused function-call arguments in tests (#12628)
This commit is contained in:
parent
a79768847f
commit
45f3cd6324
@ -31,8 +31,6 @@ describe('Basic html theme search', function() {
|
|||||||
eval(loadFixture("cpp/searchindex.js"));
|
eval(loadFixture("cpp/searchindex.js"));
|
||||||
|
|
||||||
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('C++');
|
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('C++');
|
||||||
terms = Search._index.terms;
|
|
||||||
titleterms = Search._index.titleterms;
|
|
||||||
|
|
||||||
hits = [[
|
hits = [[
|
||||||
"index",
|
"index",
|
||||||
@ -42,15 +40,13 @@ describe('Basic html theme search', function() {
|
|||||||
5,
|
5,
|
||||||
"index.rst"
|
"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() {
|
it('should be able to search for multiple terms', function() {
|
||||||
eval(loadFixture("multiterm/searchindex.js"));
|
eval(loadFixture("multiterm/searchindex.js"));
|
||||||
|
|
||||||
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('main page');
|
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('main page');
|
||||||
terms = Search._index.terms;
|
|
||||||
titleterms = Search._index.titleterms;
|
|
||||||
hits = [[
|
hits = [[
|
||||||
'index',
|
'index',
|
||||||
'Main Page',
|
'Main Page',
|
||||||
@ -58,15 +54,13 @@ describe('Basic html theme search', function() {
|
|||||||
null,
|
null,
|
||||||
15,
|
15,
|
||||||
'index.rst']];
|
'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() {
|
it('should partially-match "sphinx" when in title index', function() {
|
||||||
eval(loadFixture("partial/searchindex.js"));
|
eval(loadFixture("partial/searchindex.js"));
|
||||||
|
|
||||||
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('sphinx');
|
[_searchQuery, searchterms, excluded, ..._remainingItems] = Search._parseQuery('sphinx');
|
||||||
terms = Search._index.terms;
|
|
||||||
titleterms = Search._index.titleterms;
|
|
||||||
|
|
||||||
hits = [[
|
hits = [[
|
||||||
"index",
|
"index",
|
||||||
@ -76,7 +70,7 @@ describe('Basic html theme search', function() {
|
|||||||
7,
|
7,
|
||||||
"index.rst"
|
"index.rst"
|
||||||
]];
|
]];
|
||||||
expect(Search.performTermsSearch(searchterms, excluded, terms, titleterms)).toEqual(hits);
|
expect(Search.performTermsSearch(searchterms, excluded)).toEqual(hits);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user