feat: migrate backend to cosmiconfig

This commit is contained in:
2023-04-25 15:54:06 +02:00
parent d8c79256c9
commit 0a76427ba8
70 changed files with 1786 additions and 1635 deletions

View File

@@ -21,10 +21,10 @@ import {
SCTooManyRequestsErrorResponse,
} from '@openstapps/core';
import {expect} from 'chai';
import {configFile} from '../../src/common.js';
import {DEFAULT_TEST_TIMEOUT} from '../common.js';
import {testApp} from '../tests-setup.js';
import sinon from 'sinon';
import {backendConfig} from '../../src/config.js';
describe('Search route', async function () {
// increase timeout for the suite
@@ -96,7 +96,7 @@ describe('Search route', async function () {
it('should respond with too many requests error if the number of sub-queries exceed their max number', async function () {
const sandbox = sinon.createSandbox();
sandbox.stub(configFile.backend, 'maxMultiSearchRouteQueries').value(2);
sandbox.stub(backendConfig.backend, 'maxMultiSearchRouteQueries').value(2);
const {status} = await testApp
.post(multiSearchRoute.urlPath)