Creates a new TestData instance, optionally seeded with a base set of flag values. The seed values are applied to the SDK client when it initializes.
Optional initialFlags: { optional map of flag keys to values
Optional
Private Optional _debugPrivate _valuesPrivate _setInternal
Shared write path for the typed setters. Stores the value and, if the SDK
client is connected, applies the override. Every write fires
setOverride, mirroring a real connection that can re-deliver a flag and
fire a change event even when the value is unchanged.
A given TestData instance must be paired with at most one client.
Calling registerDebug a second time throws. The SDK plugin runner
catches this throw and logs an error rather than failing initialization,
so the second client will silently still work but will not receive
subsequent flag updates from this TestData.
Generated using TypeDoc
A mechanism for providing dynamically updatable feature flag values to an SDK client in test scenarios.
TestDataintegrates with the SDK as a plugin and uses the debug override mechanism to inject flag values. Unlike streaming or polling data sources that connect to LaunchDarkly services,TestDatalets you define flag values in code and update them during test execution without any network I/O.Primary use cases:
Important:
TestDatais intended exclusively for testing and development scenarios. It must not be used in production environments.Example