Fixed the test issue
This commit is contained in:
parent
762af0c3dd
commit
cbf7938ed7
@ -1,7 +1,5 @@
|
||||
import { ApiExtraModels, ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { IsArray, IsDefined, IsInt, IsObject, IsOptional } from "class-validator";
|
||||
import { EsPit } from "../../interfaces/elastic/es-pit.interface";
|
||||
import { EsQuery } from "../../interfaces/elastic/es-query.interface"
|
||||
import { IsDefined, IsInt, IsObject, IsOptional } from "class-validator";
|
||||
|
||||
/**
|
||||
* List of allowed properties in this DTO
|
||||
|
@ -107,13 +107,16 @@ describe('Unit tests for SearchService', () => {
|
||||
expect(httpGetSpy).toHaveBeenCalledWith<[string, object]>(expect.anything(), {
|
||||
data: {
|
||||
query: {
|
||||
query_string: {
|
||||
query: 'keyword',
|
||||
default_field: 'content',
|
||||
multi_match: {
|
||||
query: query.query,
|
||||
fields: [
|
||||
'title',
|
||||
'content'
|
||||
]
|
||||
}
|
||||
},
|
||||
from: 32,
|
||||
size: 1,
|
||||
from: query.offset,
|
||||
size: query.limit
|
||||
},
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user