chores
This commit is contained in:
@@ -40,6 +40,14 @@ describe('The Query class', () => {
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
it('should not exclude words when there is no space before', () => {
|
||||
// Act
|
||||
const query = new Query('foo bar-baz')
|
||||
|
||||
// Assert
|
||||
expect(query.exclusions).toHaveLength(0)
|
||||
})
|
||||
|
||||
describe('.getExactTerms()', () => {
|
||||
it('should an array of strings containg "exact" values', () => {
|
||||
// Act
|
||||
|
||||
@@ -183,7 +183,7 @@ export async function getSuggestions(
|
||||
else results = []
|
||||
}
|
||||
else {
|
||||
results = results.sort((a, b) => b.score - a.score).slice(0, 50)
|
||||
results = results.slice(0, 50)
|
||||
}
|
||||
|
||||
// Map the raw results to get usable suggestions
|
||||
|
||||
Reference in New Issue
Block a user