diff --git a/src/projects/report.ts b/src/projects/report.ts index d607711..e75a804 100644 --- a/src/projects/report.ts +++ b/src/projects/report.ts @@ -41,6 +41,11 @@ export interface ReportConfiguration { * @default html,pdf */ reporters?: ("html" | "pdf")[]; + /** + * Show/Hide flags emojis next to packages. + * @default true + */ + showFlags?: boolean; charts?: ReportChart[]; } diff --git a/src/schema/defs/report.json b/src/schema/defs/report.json index 73f7cdd..9af3555 100644 --- a/src/schema/defs/report.json +++ b/src/schema/defs/report.json @@ -87,6 +87,10 @@ "pdf" ] }, + "showFlags": { + "type": "boolean", + "default": true + }, "charts": { "type": "array", "items": { diff --git a/test/index.spec.ts b/test/index.spec.ts index d49cfa2..cd45641 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -65,6 +65,23 @@ describe("JSON Schema", () => { assert(validate(completeRC)); }); + it("showFlags should be true by default", () => { + const withoutshowFlags: Partial = { + report: { + title: "hello report" + } + }; + const ajv = new Ajv({ useDefaults: true }); + const validate = ajv.compile(RC.JSONSchema); + + const completeRC = merge( + generateDefaultRC("complete"), + withoutshowFlags + ); + validate(completeRC); + assert.strictEqual(completeRC.report!.showFlags, true); + }); + it("should validate all fixtures configuration", () => { const ajv = new Ajv(); const validate = ajv.compile(RC.JSONSchema);