mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 13:29:40 +02:00
Add test, fix typo
This commit is contained in:
@@ -153,11 +153,11 @@ export const getSections = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getTasks = function () {
|
export const getTasks = function () {
|
||||||
let allItemsPricessed = compileTasks();
|
let allItemsProcessed = compileTasks();
|
||||||
const maxDepth = 10;
|
const maxDepth = 10;
|
||||||
let iterationCount = 0;
|
let iterationCount = 0;
|
||||||
while (!allItemsPricessed && iterationCount < maxDepth) {
|
while (!allItemsProcessed && iterationCount < maxDepth) {
|
||||||
allItemsPricessed = compileTasks();
|
allItemsProcessed = compileTasks();
|
||||||
iterationCount++;
|
iterationCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,6 +34,7 @@ describe('when using the ganttDb', function () {
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
ganttDb.setDateFormat('YYYY-MM-DD');
|
ganttDb.setDateFormat('YYYY-MM-DD');
|
||||||
ganttDb.enableInclusiveEndDates();
|
ganttDb.enableInclusiveEndDates();
|
||||||
|
ganttDb.enableCompact();
|
||||||
ganttDb.setTodayMarker('off');
|
ganttDb.setTodayMarker('off');
|
||||||
ganttDb.setExcludes('weekends 2019-02-06,friday');
|
ganttDb.setExcludes('weekends 2019-02-06,friday');
|
||||||
ganttDb.addSection('weekends skip test');
|
ganttDb.addSection('weekends skip test');
|
||||||
@@ -53,6 +54,7 @@ describe('when using the ganttDb', function () {
|
|||||||
${'getExcludes'} | ${[]}
|
${'getExcludes'} | ${[]}
|
||||||
${'getSections'} | ${[]}
|
${'getSections'} | ${[]}
|
||||||
${'endDatesAreInclusive'} | ${false}
|
${'endDatesAreInclusive'} | ${false}
|
||||||
|
${'enabledCompact'} | ${false}
|
||||||
`)('should clear $fn', ({ fn, expected }) => {
|
`)('should clear $fn', ({ fn, expected }) => {
|
||||||
expect(ganttDb[fn]()).toEqual(expected);
|
expect(ganttDb[fn]()).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user