1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing SearchQueryParser tests

This commit is contained in:
Patrik J. Braun 2021-05-05 21:20:12 +02:00
parent 928a8918c6
commit 77363f208e

View File

@ -122,13 +122,8 @@ describe('SearchQueryParser', () => {
type: SearchQueryTypes.AND, type: SearchQueryTypes.AND,
list: [ list: [
{type: SearchQueryTypes.keyword, text: 'big boom'} as TextSearch, {type: SearchQueryTypes.keyword, text: 'big boom'} as TextSearch,
{ {type: SearchQueryTypes.caption, text: 'caption'} as TextSearch,
type: SearchQueryTypes.AND, {type: SearchQueryTypes.position, text: 'New York'} as TextSearch
list: [
{type: SearchQueryTypes.caption, text: 'caption'} as TextSearch,
{type: SearchQueryTypes.position, text: 'New York'} as TextSearch
]
} as ANDSearchQuery
] ]
} as ANDSearchQuery); } as ANDSearchQuery);
check({ check({
@ -158,13 +153,8 @@ describe('SearchQueryParser', () => {
check({ check({
type: SearchQueryTypes.OR, type: SearchQueryTypes.OR,
list: [ list: [
{ {type: SearchQueryTypes.keyword, text: 'big boom'} as TextSearch,
type: SearchQueryTypes.OR, {type: SearchQueryTypes.person, text: 'person_test'} as TextSearch,
list: [
{type: SearchQueryTypes.keyword, text: 'big boom'} as TextSearch,
{type: SearchQueryTypes.person, text: 'person_test'} as TextSearch
]
} as ORSearchQuery,
{type: SearchQueryTypes.position, text: 'New York'} as TextSearch {type: SearchQueryTypes.position, text: 'New York'} as TextSearch
] ]
} as ORSearchQuery); } as ORSearchQuery);