File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ let spyOnLogError = null;
29
29
let spyOnShowError = null ;
30
30
let spyOnSaveBackupInfo = null ;
31
31
let spyOnDataGet = null ;
32
+ let spyOnIsThereData = null ;
32
33
33
34
const spyOnsSettingsValue = jest . spyOn ( joplin . settings , "value" ) ;
34
35
const spyOnGlobalValue = jest . spyOn ( joplin . settings , "globalValue" ) ;
@@ -1119,6 +1120,15 @@ describe("Backup", function () {
1119
1120
} ) ;
1120
1121
1121
1122
describe ( "create backup readme" , ( ) => {
1123
+ beforeEach ( async ( ) => {
1124
+ spyOnIsThereData = jest
1125
+ . spyOn ( backup , "isThereData" )
1126
+ . mockImplementation ( ( ) => Promise . resolve ( true ) ) ;
1127
+ } ) ;
1128
+ afterEach ( async ( ) => {
1129
+ spyOnIsThereData . mockRestore ( ) ;
1130
+ } ) ;
1131
+
1122
1132
it . each ( [
1123
1133
{ backupRetention : 1 , createSubfolderPerProfile : false } ,
1124
1134
{ backupRetention : 2 , createSubfolderPerProfile : false } ,
You can’t perform that action at this time.
0 commit comments