@@ -149,6 +149,26 @@ describe('Task mark cycle', () => {
149
149
expect ( tc . markInCycle ( '- something' , Direction . NEXT , [ 0 ] ) ) . toEqual ( "- [a] something" ) ;
150
150
expect ( tc . markInCycle ( '- something' , Direction . PREV , [ 0 ] ) ) . toEqual ( "- [c] something" ) ;
151
151
} ) ;
152
+
153
+ test ( 'Mark tasks forward in a cycle (next) include remove task' , ( ) => {
154
+ config . markCycle = " ab§" ;
155
+ config . markCycleRemoveTask = true ;
156
+ tc . init ( config ) ;
157
+ expect ( tc . markInCycle ( '- something' , Direction . NEXT , [ 0 ] ) ) . toEqual ( "- [ ] something" ) ;
158
+ expect ( tc . markInCycle ( '- [ ] something' , Direction . NEXT , [ 0 ] ) ) . toEqual ( "- [a] something" ) ;
159
+ expect ( tc . markInCycle ( '- [a] something' , Direction . NEXT , [ 0 ] ) ) . toEqual ( "- [b] something" ) ;
160
+ expect ( tc . markInCycle ( '- [b] something' , Direction . NEXT , [ 0 ] ) ) . toEqual ( "- something" ) ;
161
+ } ) ;
162
+
163
+ test ( 'Mark tasks backward in a cycle (prev) include remove task' , ( ) => {
164
+ config . markCycle = " ab§" ;
165
+ config . markCycleRemoveTask = true ;
166
+ tc . init ( config ) ;
167
+ expect ( tc . markInCycle ( '- [b] something' , Direction . PREV , [ 0 ] ) ) . toEqual ( "- [a] something" ) ;
168
+ expect ( tc . markInCycle ( '- [a] something' , Direction . PREV , [ 0 ] ) ) . toEqual ( "- [ ] something" ) ;
169
+ expect ( tc . markInCycle ( '- [ ] something' , Direction . PREV , [ 0 ] ) ) . toEqual ( "- something" ) ;
170
+ expect ( tc . markInCycle ( '- something' , Direction . PREV , [ 0 ] ) ) . toEqual ( "- [b] something" ) ;
171
+ } ) ;
152
172
} ) ;
153
173
154
174
0 commit comments