MCPcopy
hub / github.com/Unleash/unleash / createProjects

Function createProjects

src/lib/features/segment/client-segment.e2e.test.ts:91–106  ·  view source on GitHub ↗
(projects: string[] = [DEFAULT_PROJECT])

Source from the content-addressed store, hash-verified

89};
90
91const createProjects = async (projects: string[] = [DEFAULT_PROJECT]) => {
92 for (const project of projects) {
93 await db.stores.projectStore.create({
94 name: project,
95 description: '',
96 id: project,
97 mode: 'open' as const,
98 });
99 await app.request
100 .post(`/api/admin/projects/${project}/environments`)
101 .send({
102 environment: DEFAULT_ENV,
103 })
104 .expect(200);
105 }
106};
107
108const createFeatureToggle = async (
109 feature: CreateFeatureSchema,

Callers 1

Calls 2

postMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected