Skip to content

Commit aa2bc9c

Browse files
committed
test: test with setting explicitly set to false
1 parent ea4868d commit aa2bc9c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Task.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,20 @@ describe('next task recurrence appearance', () => {
11471147
expect(tasks[1].toString()).toMatchInlineSnapshot('"this is a recurring task 🔁 every day ✅ 2023-05-16"');
11481148
});
11491149

1150+
it('new task shall appear on next line with the setting set to false', () => {
1151+
// Arrange
1152+
const task = fromLine({ line: '- [ ] this is a recurring task 🔁 every day' });
1153+
updateSettings({ recurrenceOnNextLine: false });
1154+
1155+
// Act
1156+
const tasks = task.toggle();
1157+
1158+
// Assert
1159+
expect(tasks.length).toEqual(2);
1160+
expect(tasks[0].toString()).toMatchInlineSnapshot('"this is a recurring task 🔁 every day"');
1161+
expect(tasks[1].toString()).toMatchInlineSnapshot('"this is a recurring task 🔁 every day ✅ 2023-05-16"');
1162+
});
1163+
11501164
it('new task shall appear on next line with the setting set to true', () => {
11511165
// Arrange
11521166
const task = fromLine({ line: '- [ ] this is a recurring task 🔁 every day' });

0 commit comments

Comments
 (0)