MCPcopy Index your code
hub / github.com/simstudioai/sim / withAppConfig

Function withAppConfig

apps/sim/lib/core/config/feature-flags.test.ts:42–45  ·  view source on GitHub ↗

Make `getFeatureFlags` resolve to `doc` via the AppConfig path (also exercises parseConfig).

(doc: unknown)

Source from the content-addressed store, hash-verified

40
41/** Make `getFeatureFlags` resolve to `doc` via the AppConfig path (also exercises parseConfig). */
42function withAppConfig(doc: unknown) {
43 flagRef.isAppConfigEnabled = true
44 mockFetch.mockImplementation((_ids, parse) => Promise.resolve(parse(doc)))
45}
46
47/**
48 * `isFeatureEnabled` only accepts registered `FeatureFlagName`s. The registry is

Callers 1

Calls 2

resolveMethod · 0.65
parseFunction · 0.50

Tested by

no test coverage detected