mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-08 08:39:38 +02:00
chore: move spec test to it.each
This commit is contained in:
@@ -181,32 +181,11 @@ row2`;
|
|||||||
expect(ganttDb.getAccDescription()).toBe(expectedAccDescription);
|
expect(ganttDb.getAccDescription()).toBe(expectedAccDescription);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow for setting the starting weekday to monday for tick intervals', function () {
|
it.each(['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'])(
|
||||||
parser.parse('gantt\nweekday monday');
|
'should allow for setting the starting weekday to %s for tick interval',
|
||||||
expect(ganttDb.getWeekday()).toBe('monday');
|
(day) => {
|
||||||
});
|
parser.parse(`gantt\nweekday ${day}`);
|
||||||
it('should allow for setting the starting weekday to tuesday for tick intervals', function () {
|
expect(ganttDb.getWeekday()).toBe(day);
|
||||||
parser.parse('gantt\nweekday tuesday');
|
}
|
||||||
expect(ganttDb.getWeekday()).toBe('tuesday');
|
);
|
||||||
});
|
|
||||||
it('should allow for setting the starting weekday to wednesday for tick intervals', function () {
|
|
||||||
parser.parse('gantt\nweekday wednesday');
|
|
||||||
expect(ganttDb.getWeekday()).toBe('wednesday');
|
|
||||||
});
|
|
||||||
it('should allow for setting the starting weekday to thursday for tick intervals', function () {
|
|
||||||
parser.parse('gantt\nweekday thursday');
|
|
||||||
expect(ganttDb.getWeekday()).toBe('thursday');
|
|
||||||
});
|
|
||||||
it('should allow for setting the starting weekday to friday for tick intervals', function () {
|
|
||||||
parser.parse('gantt\nweekday friday');
|
|
||||||
expect(ganttDb.getWeekday()).toBe('friday');
|
|
||||||
});
|
|
||||||
it('should allow for setting the starting weekday to saturday for tick intervals', function () {
|
|
||||||
parser.parse('gantt\nweekday saturday');
|
|
||||||
expect(ganttDb.getWeekday()).toBe('saturday');
|
|
||||||
});
|
|
||||||
it('should allow for setting the starting weekday to sunday for tick intervals', function () {
|
|
||||||
parser.parse('gantt\nweekday sunday');
|
|
||||||
expect(ganttDb.getWeekday()).toBe('sunday');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user