Massive refactor to get rid of the global app.
This commit is contained in:
@@ -6,7 +6,7 @@ describe('The Query class', () => {
|
||||
|
||||
it('should correctly parse string queries', () => {
|
||||
// Act
|
||||
const query = new Query(stringQuery)
|
||||
const query = new Query(stringQuery, { ignoreDiacritics: true })
|
||||
|
||||
// Assert
|
||||
const segments = query.query.text
|
||||
@@ -25,7 +25,7 @@ describe('The Query class', () => {
|
||||
|
||||
it('should not exclude words when there is no space before', () => {
|
||||
// Act
|
||||
const query = new Query('foo bar-baz')
|
||||
const query = new Query('foo bar-baz', { ignoreDiacritics: true })
|
||||
|
||||
// Assert
|
||||
expect(query.query.exclude.text).toHaveLength(0)
|
||||
@@ -34,7 +34,7 @@ describe('The Query class', () => {
|
||||
describe('.getExactTerms()', () => {
|
||||
it('should an array of strings containg "exact" values', () => {
|
||||
// Act
|
||||
const query = new Query(stringQuery)
|
||||
const query = new Query(stringQuery, { ignoreDiacritics: true })
|
||||
|
||||
// Assert
|
||||
expect(query.getExactTerms()).toEqual(['lorem ipsum', 'sit amet'])
|
||||
|
||||
Reference in New Issue
Block a user