From f054609e02b6c4f11ed3df1c98930f1eb7147f7f Mon Sep 17 00:00:00 2001 From: Jeremy Funk Date: Thu, 23 Mar 2023 22:58:46 +0100 Subject: [PATCH] Add test, fix typo --- packages/mermaid/src/diagrams/gantt/ganttDb.js | 6 +++--- packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.js b/packages/mermaid/src/diagrams/gantt/ganttDb.js index d205cfff0..807a0ee81 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.js +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.js @@ -153,11 +153,11 @@ export const getSections = function () { }; export const getTasks = function () { - let allItemsPricessed = compileTasks(); + let allItemsProcessed = compileTasks(); const maxDepth = 10; let iterationCount = 0; - while (!allItemsPricessed && iterationCount < maxDepth) { - allItemsPricessed = compileTasks(); + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); iterationCount++; } diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts index d65f2fdfd..4513aeb11 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts @@ -34,6 +34,7 @@ describe('when using the ganttDb', function () { beforeEach(function () { ganttDb.setDateFormat('YYYY-MM-DD'); ganttDb.enableInclusiveEndDates(); + ganttDb.enableCompact(); ganttDb.setTodayMarker('off'); ganttDb.setExcludes('weekends 2019-02-06,friday'); ganttDb.addSection('weekends skip test'); @@ -53,6 +54,7 @@ describe('when using the ganttDb', function () { ${'getExcludes'} | ${[]} ${'getSections'} | ${[]} ${'endDatesAreInclusive'} | ${false} + ${'enabledCompact'} | ${false} `)('should clear $fn', ({ fn, expected }) => { expect(ganttDb[fn]()).toEqual(expected); });