MCPcopy
hub / github.com/growthbook/growthbook / makeFeature

Function makeFeature

packages/back-end/test/api/features.test.ts:61–81  ·  view source on GitHub ↗
(
  overrides: Partial<FeatureInterface> = {},
)

Source from the content-addressed store, hash-verified

59// ---------------------------------------------------------------------------
60
61const makeFeature = (
62 overrides: Partial<FeatureInterface> = {},
63): FeatureInterface => ({
64 organization: "org",
65 defaultValue: "false",
66 valueType: "boolean",
67 owner: "owner",
68 description: "description",
69 project: "project",
70 id: "myfeature",
71 archived: false,
72 tags: [],
73 dateCreated: new Date(),
74 dateUpdated: new Date(),
75 version: 1,
76 environmentSettings: {
77 production: { enabled: true, rules: [] },
78 },
79 prerequisites: [],
80 ...overrides,
81});
82
83const makeRevisionDoc = (version: number, featureId = "myfeature") => ({
84 version,

Callers 2

features.test.tsFile · 0.70
setupUpdateTestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…