@@ -230,7 +230,7 @@ describe('Grouping tasks', () => {
230
230
` ) ;
231
231
} ) ;
232
232
233
- it ( 'should create nested headings if multiple groups used' , ( ) => {
233
+ it ( 'should create nested headings if multiple groups used even if one is reversed ' , ( ) => {
234
234
// Arrange
235
235
const t1 = fromLine ( {
236
236
line : '- [ ] Task 1 - but path is 2nd, alphabetically' ,
@@ -246,21 +246,14 @@ describe('Grouping tasks', () => {
246
246
} ) ;
247
247
const tasks = [ t1 , t2 , t3 ] ;
248
248
249
- const grouping : Grouper [ ] = [ new FolderField ( ) . createGrouper ( ) , new FilenameField ( ) . createGrouper ( ) ] ;
249
+ const grouping : Grouper [ ] = [ new FolderField ( ) . createGrouper ( true ) , new FilenameField ( ) . createGrouper ( ) ] ;
250
250
251
251
// Act
252
252
const groups = new TaskGroups ( grouping , tasks ) ;
253
253
254
254
// Assert
255
255
expect ( groups . toString ( ) ) . toMatchInlineSnapshot ( `
256
256
"
257
- Group names: [folder\\_a/folder\\_b/,[[file_c]]]
258
- #### folder\\_a/folder\\_b/
259
- ##### [[file_c]]
260
- - [ ] Task 3 - but path is 1st, alphabetically
261
-
262
- ---
263
-
264
257
Group names: [folder\\_b/folder\\_c/,[[file_c]]]
265
258
#### folder\\_b/folder\\_c/
266
259
##### [[file_c]]
@@ -274,6 +267,13 @@ describe('Grouping tasks', () => {
274
267
275
268
---
276
269
270
+ Group names: [folder\\_a/folder\\_b/,[[file_c]]]
271
+ #### folder\\_a/folder\\_b/
272
+ ##### [[file_c]]
273
+ - [ ] Task 3 - but path is 1st, alphabetically
274
+
275
+ ---
276
+
277
277
3 tasks
278
278
"
279
279
` ) ;
0 commit comments