mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-04-23 06:39:13 +00:00
fix: pipeline
This commit is contained in:
@@ -31,7 +31,7 @@ import {buildQuery} from '../../../src/storage/elasticsearch/query/query.js';
|
||||
import {buildSort} from '../../../src/storage/elasticsearch/query/sort.js';
|
||||
import {ElasticsearchConfig} from '../../../src/storage/elasticsearch/types/elasticsearch-config.js';
|
||||
import {QueryDslSpecificQueryContainer} from '../../../src/storage/elasticsearch/types/util.js';
|
||||
import {SortCombinations} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {QueryDslRangeQuery, SortCombinations} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {backendConfig} from '../../../src/config.js';
|
||||
|
||||
describe('Query', function () {
|
||||
@@ -363,8 +363,10 @@ describe('Query', function () {
|
||||
const filter = buildFilter(rawFilter) as QueryDslSpecificQueryContainer<'range'>;
|
||||
expect(filter).to.deep.equal(expectedFilter);
|
||||
for (const bound of ['g', 'l']) {
|
||||
const inclusiveExists = typeof filter.range.price[`${bound}t`] !== 'undefined';
|
||||
const exclusiveExists = typeof filter.range.price[`${bound}te`] !== 'undefined';
|
||||
const inclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}t` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
const exclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}te` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
|
||||
// only one should exist at the same time
|
||||
expect(inclusiveExists && exclusiveExists).to.be.false;
|
||||
|
||||
Reference in New Issue
Block a user