UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

29 lines 1.06 kB
import merge from 'deepmerge'; import { IAuthType, } from '../../lib/types/option.js'; import getLogger from '../fixtures/no-logger.js'; import { createConfig } from '../../lib/create-config.js'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; function mergeAll(objects) { return merge.all(objects.filter((i) => i)); } const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export function createTestConfig(config) { getLogger.setMuteError(true); const testConfig = { getLogger, authentication: { type: IAuthType.NONE, createAdminUser: false }, server: { secret: 'really-secret' }, session: { db: false }, versionCheck: { enable: false }, disableScheduler: true, clientFeatureCaching: { enabled: false, }, publicFolder: path.join(__dirname, '../examples'), }; const options = mergeAll([testConfig, config || {}]); return createConfig(options); } //# sourceMappingURL=test-config.js.map