// (C) 2007-2019 GoodData Corporation import { buildProject } from "../../builder"; import { IFeatureFlags } from "../../../model/FeatureFlags"; import { ISchema } from "../../model/Schema"; import { schema } from "../../fixtures/dummySchema"; const defaultFeatureFlags = { oldHeader: false, enableCsvUploader: true, disableDefaultBulkUpload: true, mufTable: false, enableAnalyticalDashboardsVisualizations: true, enableIncrementalLoad: true, analyticalDesigner: true, enableAnalyticalDashboards: true, newNavigation: false, }; it("should set default featureFlags", () => { expect(buildProject(schema).featureFlags).toEqual(defaultFeatureFlags); }); it("should build project with custom featureFlags", () => { const featureFlags: IFeatureFlags = { a: true, b: false, enableCsvUploader: false, }; const schemaWithCustomFeatureFlags: ISchema = { ...schema, featureFlags, }; const project = buildProject(schemaWithCustomFeatureFlags); expect(project.featureFlags).toEqual({ ...defaultFeatureFlags, ...featureFlags }); });