mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-04-23 06:39:13 +00:00
feat: update tests
feat: update tests feat: update tests
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
import {SCConfigFile, SCSearchQuery, SCSearchResponse, SCThings, SCThingType, SCUuid} from '@openstapps/core';
|
||||
import {Express} from 'express';
|
||||
import moment from 'moment';
|
||||
import {getIndexUID} from '../src/storage/elasticsearch/util.js';
|
||||
import {configureApp} from '../src/app.js';
|
||||
import express from 'express';
|
||||
import http from 'http';
|
||||
@@ -26,6 +25,7 @@ import getPort from 'get-port';
|
||||
import {Database} from '../src/storage/database.js';
|
||||
import {v4} from 'uuid';
|
||||
import {backendConfig} from '../src/config.js';
|
||||
import {getIndexUID} from '../src/storage/elasticsearch/util/index.js';
|
||||
|
||||
/**
|
||||
* Adds routers and configures an (express) app
|
||||
|
||||
@@ -31,8 +31,8 @@ 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 {configFile} from '../../../src/common.js';
|
||||
import {SortCombinations} from '@elastic/elasticsearch/lib/api/types';
|
||||
import {backendConfig} from '../../../src/config.js';
|
||||
|
||||
describe('Query', function () {
|
||||
describe('buildBooleanFilter', function () {
|
||||
@@ -363,9 +363,7 @@ describe('Query', function () {
|
||||
const filter = buildFilter(rawFilter) as QueryDslSpecificQueryContainer<'range'>;
|
||||
expect(filter).to.deep.equal(expectedFilter);
|
||||
for (const bound of ['g', 'l']) {
|
||||
// @ts-expect-error implicit any
|
||||
const inclusiveExists = typeof filter.range.price[`${bound}t`] !== 'undefined';
|
||||
// @ts-expect-error implicit any
|
||||
const exclusiveExists = typeof filter.range.price[`${bound}te`] !== 'undefined';
|
||||
|
||||
// only one should exist at the same time
|
||||
|
||||
Reference in New Issue
Block a user