Skip to content

Commit cd8e1df

Browse files
committed
test: use createNormalGrouper()
1 parent d33953d commit cd8e1df

23 files changed

+31
-31
lines changed

tests/CustomMatchers/CustomMatchersForGrouping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function toSupportGroupingWithProperty(field: Field, property: string) {
2424
};
2525
}
2626

27-
const fieldGrouper = field.createGrouper();
27+
const fieldGrouper = field.createNormalGrouper();
2828
if (fieldGrouper.property !== property) {
2929
return {
3030
message: () =>

tests/DocumentationSamples/DocsSamplesForStatuses.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ function verifyTransitionsAsMarkdownTable(statuses: Status[]) {
208208
table.addRow(cells);
209209
}
210210

211-
showGroupNamesForAllTasks('status', new StatusField().createGrouper().grouper);
212-
showGroupNamesForAllTasks('status.type', new StatusTypeField().createGrouper().grouper);
213-
showGroupNamesForAllTasks('status.name', new StatusNameField().createGrouper().grouper);
211+
showGroupNamesForAllTasks('status', new StatusField().createNormalGrouper().grouper);
212+
showGroupNamesForAllTasks('status.type', new StatusTypeField().createNormalGrouper().grouper);
213+
showGroupNamesForAllTasks('status.name', new StatusNameField().createNormalGrouper().grouper);
214214

215215
table.verifyForDocs();
216216
}

tests/Query/Filter/BacklinkField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('grouping by backlink', () => {
5858
'path "%s" and heading "%s" should have groups: %s',
5959
(path: string, heading: string | null, groups: string[]) => {
6060
// Arrange
61-
const grouper = new BacklinkField().createGrouper().grouper;
61+
const grouper = new BacklinkField().createNormalGrouper().grouper;
6262
const t = '- [ ] xyz';
6363

6464
// Assert

tests/Query/Filter/CreatedDateField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('grouping by created date', () => {
9797

9898
it('group by created date', () => {
9999
// Arrange
100-
const grouper = new CreatedDateField().createGrouper();
100+
const grouper = new CreatedDateField().createNormalGrouper();
101101
const taskWithDate = new TaskBuilder().createdDate('1970-01-01').build();
102102
const taskWithoutDate = new TaskBuilder().build();
103103

tests/Query/Filter/DoneDateField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('grouping by done date', () => {
9494

9595
it('group by done date', () => {
9696
// Arrange
97-
const grouper = new DoneDateField().createGrouper();
97+
const grouper = new DoneDateField().createNormalGrouper();
9898
const taskWithDate = new TaskBuilder().doneDate('1970-01-01').build();
9999
const taskWithoutDate = new TaskBuilder().build();
100100

tests/Query/Filter/DueDateField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ describe('grouping by due date', () => {
523523

524524
it('group by due date', () => {
525525
// Arrange
526-
const grouper = new DueDateField().createGrouper();
526+
const grouper = new DueDateField().createNormalGrouper();
527527
const taskWithDate = new TaskBuilder().dueDate('1970-01-01').build();
528528
const taskWithoutDate = new TaskBuilder().build();
529529

tests/Query/Filter/FilenameField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('grouping by filename', () => {
114114
['- [ ] a', 'a/b/_c_.md', ['[[_c_]]']],
115115
])('task "%s" with path "%s" should have groups: %s', (taskLine: string, path: string, groups: string[]) => {
116116
// Arrange
117-
const grouper = new FilenameField().createGrouper().grouper;
117+
const grouper = new FilenameField().createNormalGrouper().grouper;
118118

119119
// Assert
120120
expect(grouper(fromLine({ line: taskLine, path: path }))).toEqual(groups);

tests/Query/Filter/FolderField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('grouping by folder', () => {
4343
['- [ ] a', 'a.md', ['/']],
4444
])('task "%s" with path "%s" should have groups: %s', (taskLine: string, path: string, groups: string[]) => {
4545
// Arrange
46-
const grouper = new FolderField().createGrouper().grouper;
46+
const grouper = new FolderField().createNormalGrouper().grouper;
4747

4848
// Assert
4949
expect(grouper(fromLine({ line: taskLine, path: path }))).toEqual(groups);

tests/Query/Filter/HappensDateField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('grouping by happens date', () => {
150150
['- [ ] start is earliest date 🛫 1970-01-01 ⏳ 1970-01-02 📅 1970-01-03', ['1970-01-01 Thursday']],
151151
])('group by happens date: task "%s" should have groups %s', (taskLine: string, expectedResult: string[]) => {
152152
// Arrange
153-
const grouper = new HappensDateField().createGrouper();
153+
const grouper = new HappensDateField().createNormalGrouper();
154154

155155
// Assert
156156
expect(grouper.grouper(fromLine({ line: taskLine }))).toEqual(expectedResult);

tests/Query/Filter/HeadingField.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('grouping by heading', () => {
104104
'task "%s" with header "%s" should have groups: %s',
105105
(taskLine: string, header: string | null, groups: string[]) => {
106106
// Arrange
107-
const grouper = new HeadingField().createGrouper().grouper;
107+
const grouper = new HeadingField().createNormalGrouper().grouper;
108108

109109
// Assert
110110
expect(grouper(fromLine({ line: taskLine, precedingHeader: header }))).toEqual(groups);

0 commit comments

Comments
 (0)