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:
parent
928a8918c6
commit
77363f208e
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user