@@ -1139,12 +1139,12 @@ describe('next task recurrence appearance', () => {
1139
1139
const task = fromLine ( { line : '- [ ] this is a recurring task π every day' } ) ;
1140
1140
1141
1141
// Act
1142
- const tasks = task . toggle ( ) ;
1142
+ const lines = task . toggle ( ) . map ( ( t ) => t . toFileLineString ( ) ) ;
1143
1143
1144
1144
// Assert
1145
- expect ( tasks . length ) . toEqual ( 2 ) ;
1146
- expect ( tasks [ 0 ] . toString ( ) ) . toMatchInlineSnapshot ( '"this is a recurring task π every day"' ) ;
1147
- expect ( tasks [ 1 ] . toString ( ) ) . toMatchInlineSnapshot ( '"this is a recurring task π every day β
2023-05-16"' ) ;
1145
+ expect ( lines . length ) . toEqual ( 2 ) ;
1146
+ expect ( lines [ 0 ] ) . toMatchInlineSnapshot ( '"- [ ] this is a recurring task π every day"' ) ;
1147
+ expect ( lines [ 1 ] ) . toMatchInlineSnapshot ( '"- [x] this is a recurring task π every day β
2023-05-16"' ) ;
1148
1148
} ) ;
1149
1149
1150
1150
it ( 'new task shall appear on next line with the setting set to false' , ( ) => {
@@ -1153,12 +1153,12 @@ describe('next task recurrence appearance', () => {
1153
1153
updateSettings ( { recurrenceOnNextLine : false } ) ;
1154
1154
1155
1155
// Act
1156
- const tasks = task . toggle ( ) ;
1156
+ const lines = task . toggle ( ) . map ( ( t ) => t . toFileLineString ( ) ) ;
1157
1157
1158
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"' ) ;
1159
+ expect ( lines . length ) . toEqual ( 2 ) ;
1160
+ expect ( lines [ 0 ] ) . toMatchInlineSnapshot ( '"- [ ] this is a recurring task π every day"' ) ;
1161
+ expect ( lines [ 1 ] ) . toMatchInlineSnapshot ( '"- [x] this is a recurring task π every day β
2023-05-16"' ) ;
1162
1162
} ) ;
1163
1163
1164
1164
it ( 'new task shall appear on next line with the setting set to true' , ( ) => {
@@ -1167,12 +1167,12 @@ describe('next task recurrence appearance', () => {
1167
1167
updateSettings ( { recurrenceOnNextLine : true } ) ;
1168
1168
1169
1169
// Act
1170
- const tasks = task . toggle ( ) ;
1170
+ const lines = task . toggle ( ) . map ( ( t ) => t . toFileLineString ( ) ) ;
1171
1171
1172
1172
// Assert
1173
- expect ( tasks . length ) . toEqual ( 2 ) ;
1174
- expect ( tasks [ 0 ] . toString ( ) ) . toMatchInlineSnapshot ( '"this is a recurring task π every day β
2023-05-16"' ) ;
1175
- expect ( tasks [ 1 ] . toString ( ) ) . toMatchInlineSnapshot ( '"this is a recurring task π every day"' ) ;
1173
+ expect ( lines . length ) . toEqual ( 2 ) ;
1174
+ expect ( lines [ 0 ] ) . toMatchInlineSnapshot ( '"- [x] this is a recurring task π every day β
2023-05-16"' ) ;
1175
+ expect ( lines [ 1 ] ) . toMatchInlineSnapshot ( '"- [ ] this is a recurring task π every day"' ) ;
1176
1176
} ) ;
1177
1177
} ) ;
1178
1178
0 commit comments