File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
import moment from 'moment' ;
5
5
import { FilenameField } from '../src/Query/Filter/FilenameField' ;
6
- import { Grouper , type GrouperFunction } from '../src/Query/Grouper' ;
6
+ import type { Grouper } from '../src/Query/Grouper' ;
7
7
import type { Task } from '../src/Task' ;
8
8
import { PathField } from '../src/Query/Filter/PathField' ;
9
9
import { TagsField } from '../src/Query/Filter/TagsField' ;
@@ -251,8 +251,7 @@ describe('Grouping tasks', () => {
251
251
} ) ;
252
252
const inputs = [ a , b ] ;
253
253
254
- const groupByTags : GrouperFunction = ( task : Task ) => task . tags ;
255
- const grouper = new Grouper ( 'custom tag grouper' , groupByTags , false ) ;
254
+ const grouper = new TagsField ( ) . createNormalGrouper ( ) ;
256
255
const groups = new TaskGroups ( [ grouper ] , inputs ) ;
257
256
258
257
expect ( groups . totalTasksCount ( ) ) . toEqual ( 2 ) ;
@@ -264,15 +263,16 @@ describe('Grouping tasks', () => {
264
263
265
264
expect ( groups . toString ( ) ) . toMatchInlineSnapshot ( `
266
265
"Groupers (if any):
267
- - custom tag grouper
266
+ - tags
268
267
269
- Group names: []
268
+ Group names: [(No tags)]
269
+ #### [tags] (No tags)
270
270
- [ ] Task without a tag
271
271
272
272
---
273
273
274
274
Group names: [#group1]
275
- #### [custom tag grouper ] #group1
275
+ #### [tags ] #group1
276
276
- [ ] Task with a tag #group1
277
277
278
278
---
You can’t perform that action at this time.
0 commit comments