File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -280,8 +280,8 @@ export abstract class Field {
280
280
* For now, parsing of `group by` lines is currently done in {@link FilterParser.parseGrouper()}.
281
281
* Later, this will probably be moved to the {@link Field} classes.
282
282
*/
283
- public createGrouper ( ) : Grouper {
284
- return new Grouper ( this . fieldNameSingular ( ) , this . grouper ( ) ) ;
283
+ public createGrouper ( reverse : boolean = false ) : Grouper {
284
+ return new Grouper ( this . fieldNameSingular ( ) , this . grouper ( ) , reverse ) ;
285
285
}
286
286
287
287
/**
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 } 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' ;
@@ -171,8 +171,7 @@ describe('Grouping tasks', () => {
171
171
const inputs = [ a , b ] ;
172
172
173
173
// Act
174
- const dueDateField = new DueDateField ( ) ;
175
- const grouping : Grouper [ ] = [ new Grouper ( 'due reverse' , dueDateField . grouper ( ) , true ) ] ;
174
+ const grouping : Grouper [ ] = [ new DueDateField ( ) . createGrouper ( true ) ] ;
176
175
const groups = new TaskGroups ( grouping , inputs ) ;
177
176
178
177
// Assert
You can’t perform that action at this time.
0 commit comments