Skip to content

Commit 353ae55

Browse files
committed
test: Rename toToggleLineTo() to toToggleTo()
1 parent ed2c7d4 commit 353ae55

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

β€Žtests/CustomMatchers/CustomMatchersForTasks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ import { fromLine } from '../TestHelpers';
44
declare global {
55
namespace jest {
66
interface Matchers<R> {
7-
toToggleLineTo(expectedLines: string[]): R;
7+
toToggleTo(expectedLines: string[]): R;
88
toToggleWithRecurrenceInUsersOrderTo(expectedLines: string[]): R;
99
}
1010

1111
interface Expect {
12-
toToggleLineTo(expectedLines: string[]): any;
12+
toToggleTo(expectedLines: string[]): any;
1313
toToggleWithRecurrenceInUsersOrderTo(expectedLines: string[]): any;
1414
}
1515

1616
interface InverseAsymmetricMatchers {
17-
toToggleLineTo(expectedLines: string[]): any;
17+
toToggleTo(expectedLines: string[]): any;
1818
toToggleWithRecurrenceInUsersOrderTo(expectedLines: string[]): any;
1919
}
2020
}
2121
}
2222

23-
export function toToggleLineTo(line: string, expectedLines: string[]) {
23+
export function toToggleTo(line: string, expectedLines: string[]) {
2424
const task = fromLine({ line: line });
2525
const receivedLines = task.toggle().map((t) => t.toFileLineString());
2626
return toMatchLines(receivedLines, expectedLines);

β€Žtests/CustomMatchers/jest.custom_matchers.setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ expect.extend({
3939
// ---------------------------------------------------------------------
4040
// CustomMatchersForTasks
4141
// ---------------------------------------------------------------------
42-
import { toToggleLineTo, toToggleWithRecurrenceInUsersOrderTo } from './CustomMatchersForTasks';
42+
import { toToggleTo, toToggleWithRecurrenceInUsersOrderTo } from './CustomMatchersForTasks';
4343
expect.extend({
44-
toToggleLineTo,
44+
toToggleTo,
4545
toToggleWithRecurrenceInUsersOrderTo,
4646
});
4747

β€Žtests/Task.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ describe('created dates on recurring task', () => {
10351035
updateSettings({ setCreatedDate: false });
10361036

10371037
// Act
1038-
expect(line).toToggleLineTo([
1038+
expect(line).toToggleTo([
10391039
'- [ ] this is a task πŸ” every day πŸ“… 2021-09-13',
10401040
'- [x] this is a task πŸ” every day πŸ“… 2021-09-12 βœ… 2023-03-08',
10411041
]);
@@ -1047,7 +1047,7 @@ describe('created dates on recurring task', () => {
10471047
updateSettings({ setCreatedDate: false });
10481048

10491049
// Act
1050-
expect(line).toToggleLineTo([
1050+
expect(line).toToggleTo([
10511051
'- [ ] this is a task πŸ” every day πŸ“… 2021-09-13',
10521052
'- [x] this is a task πŸ” every day βž• 2021-09-11 πŸ“… 2021-09-12 βœ… 2023-03-08',
10531053
]);
@@ -1059,7 +1059,7 @@ describe('created dates on recurring task', () => {
10591059
updateSettings({ setCreatedDate: true });
10601060

10611061
// Act
1062-
expect(line).toToggleLineTo([
1062+
expect(line).toToggleTo([
10631063
'- [ ] this is a task πŸ” every day βž• 2023-03-08 πŸ“… 2021-09-13',
10641064
'- [x] this is a task πŸ” every day πŸ“… 2021-09-12 βœ… 2023-03-08',
10651065
]);
@@ -1071,7 +1071,7 @@ describe('created dates on recurring task', () => {
10711071
updateSettings({ setCreatedDate: true });
10721072

10731073
// Act
1074-
expect(line).toToggleLineTo([
1074+
expect(line).toToggleTo([
10751075
'- [ ] this is a task πŸ” every day βž• 2023-03-08 πŸ“… 2021-09-13',
10761076
'- [x] this is a task πŸ” every day βž• 2021-09-11 πŸ“… 2021-09-12 βœ… 2023-03-08',
10771077
]);

0 commit comments

Comments
Β (0)