feat(tests): integrate qenv for dynamic configuration and enhance SKR API tests

This commit is contained in:
2025-08-10 19:52:23 +00:00
parent f42c8539a6
commit 10ca6f2992
10 changed files with 693 additions and 27 deletions

View File

@@ -1,12 +1,16 @@
import { tap, expect } from '@git.zone/tstest/tapbundle';
import * as skr from '../ts/index.js';
import { getTestConfig } from './helpers/setup.js';
let api: skr.SkrApi;
let testConfig: Awaited<ReturnType<typeof getTestConfig>>;
tap.test('should initialize SKR03 API', async () => {
testConfig = await getTestConfig();
api = new skr.SkrApi({
mongoDbUrl: 'mongodb://localhost:27017',
dbName: 'test_skr03',
mongoDbUrl: testConfig.mongoDbUrl,
dbName: `${testConfig.mongoDbName}_skr03`,
});
await api.initialize('SKR03');