Fixed the test issue

This commit is contained in:
Danny 2022-11-09 13:27:50 +03:00
parent 762af0c3dd
commit cbf7938ed7
2 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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' }
});