@@ -1019,6 +1019,10 @@ describe('toggle done', () => {
1019
1019
} ) ;
1020
1020
1021
1021
describe ( 'set correct created date on reccurence task' , ( ) => {
1022
+ afterEach ( ( ) => {
1023
+ resetSettings ( ) ;
1024
+ } ) ;
1025
+
1022
1026
it ( 'does not set created date with disabled setting' , ( ) => {
1023
1027
// Arrange
1024
1028
const line = '- [ ] this is a task 📅 2021-09-12 🔁 every day' ;
@@ -1037,9 +1041,6 @@ describe('set correct created date on reccurence task', () => {
1037
1041
expect ( tasks . length ) . toEqual ( 2 ) ;
1038
1042
const nextTask : Task = tasks [ 0 ] ;
1039
1043
expect ( nextTask . createdDate ) . toBeNull ( ) ;
1040
-
1041
- // cleanup
1042
- resetSettings ( ) ;
1043
1044
} ) ;
1044
1045
1045
1046
it ( 'does not set created date with disabled setting when repeated has created date' , ( ) => {
@@ -1061,9 +1062,6 @@ describe('set correct created date on reccurence task', () => {
1061
1062
expect ( tasks . length ) . toEqual ( 2 ) ;
1062
1063
const nextTask : Task = tasks [ 0 ] ;
1063
1064
expect ( nextTask . createdDate ) . toBeNull ( ) ;
1064
-
1065
- // cleanup
1066
- resetSettings ( ) ;
1067
1065
} ) ;
1068
1066
1069
1067
it ( 'set created date with enabled setting' , ( ) => {
@@ -1089,7 +1087,6 @@ describe('set correct created date on reccurence task', () => {
1089
1087
expect ( nextTask ! . createdDate ! . isSame ( moment ( today , 'YYYY-MM-DD' ) ) ) . toStrictEqual ( true ) ;
1090
1088
1091
1089
// cleanup
1092
- resetSettings ( ) ;
1093
1090
todaySpy . mockClear ( ) ;
1094
1091
} ) ;
1095
1092
@@ -1117,7 +1114,6 @@ describe('set correct created date on reccurence task', () => {
1117
1114
expect ( nextTask ! . createdDate ! . isSame ( moment ( today , 'YYYY-MM-DD' ) ) ) . toStrictEqual ( true ) ;
1118
1115
1119
1116
// cleanup
1120
- resetSettings ( ) ;
1121
1117
todaySpy . mockClear ( ) ;
1122
1118
} ) ;
1123
1119
} ) ;
0 commit comments