Skip to content

publishFlags

function publishFlags(core, flags): Promise<string>;

Defined in: testing.ts:143

Upsert flags into the draft and publish a snapshot in one call. Returns the version.

Parameter Type
core FlagsCore
flags Flag[]

Promise<string>

import { createTestPanel, booleanFlag, publishFlags } from "@xtandard/flags/testing";
const { core } = createTestPanel();
const version = await publishFlags(core, [
booleanFlag("feature-a"),
booleanFlag("feature-b", { default: true }),
]);
console.log(version); // "v1"