Skip to content

@xtandard/flags/testing

Test helpers for @xtandard/flags consumers and the package’s own suite. Spin up an in-memory panel, build flags fluently, and publish snapshots without any external storage.

import { … } from "@xtandard/flags/testing";
Name Summary
booleanFlag Build a boolean flag (variants on/off).
createTestPanel Create an in-memory FlagsCore with separate source/runtime stores.
publishFlags Upsert flags into the draft and publish a snapshot in one call. Returns the version.
variantFlag Build a string/number/json flag from a variant map.
Name Summary
TestPanel An in-memory panel: a core plus its source/runtime stores.
Name Summary
FlagBuildType
FlagBuildValue
Name Documented on
createMemoryStorage @xtandard/flags/storage/memory