Skip to content

Commit 7e99019

Browse files
committed
Fix tests
1 parent 173fa71 commit 7e99019

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If you already have your own scraper but you still want to use MeiliSearch and `
9191
</html>
9292
```
9393

94-
The `hostUrl` and the `apiKey` (_optionnal_) fields are the credentials of your MeiliSearch instance.<br>
94+
The `hostUrl` and the `apiKey` (_optional_) fields are the credentials of your MeiliSearch instance.<br>
9595
`indexUid` is the index identifier in your MeiliSearch instance in which your website content is stored.<br>
9696
`inputSelector` is the `id` attribute of the HTML search input tag.
9797

src/lib/DocsSearchBar.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ class DocsSearchBar {
302302
groupedHits[level] = flattenedHits
303303
})
304304
groupedHits = utils.flattenAndFlagFirst(groupedHits, 'isCategoryHeader')
305-
console.log({ groupedHits })
306305
// Translate hits into smaller objects to be send to the template
307306
return groupedHits.map((hit) => {
308307
const url = DocsSearchBar.formatURL(hit)
@@ -331,20 +330,6 @@ class DocsSearchBar {
331330
!isLvl2 && subcategory && subcategory !== '' && subcategory !== category
332331
const isLvl0 = !isLvl1 && !isLvl2
333332

334-
console.log({
335-
isLvl0,
336-
isLvl1,
337-
isLvl2,
338-
isLvl1EmptyOrDuplicate,
339-
isCategoryHeader: hit.isCategoryHeader,
340-
isSubCategoryHeader: hit.isSubCategoryHeader,
341-
isTextOrSubcategoryNonEmpty,
342-
category,
343-
subcategory,
344-
title: displayTitle,
345-
text,
346-
url,
347-
})
348333
return {
349334
isLvl0,
350335
isLvl1,

src/lib/__tests__/DocsSearchBar-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ describe('DocsSearchBar', () => {
283283
hostUrl: 'test.com',
284284
apiKey: 'apiKey',
285285
indexUid: 'indexUID',
286+
inputSelector: '#',
286287
}
287288
sinon.stub(DocsSearchBar, 'getInputFromSelector').returns(false)
288289

0 commit comments

Comments
 (0)