Skip to content

Commit

Permalink
Fix test after isThereData implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Mar 6, 2024
1 parent 4b92f21 commit 871c579
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __test__/backup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let spyOnLogError = null;
let spyOnShowError = null;
let spyOnSaveBackupInfo = null;
let spyOnDataGet = null;
let spyOnIsThereData = null;

const spyOnsSettingsValue = jest.spyOn(joplin.settings, "value");
const spyOnGlobalValue = jest.spyOn(joplin.settings, "globalValue");
Expand Down Expand Up @@ -1119,6 +1120,15 @@ describe("Backup", function () {
});

describe("create backup readme", () => {
beforeEach(async () => {
spyOnIsThereData = jest
.spyOn(backup, "isThereData")
.mockImplementation(() => Promise.resolve(true));
});
afterEach(async () => {
spyOnIsThereData.mockRestore();
});

it.each([
{ backupRetention: 1, createSubfolderPerProfile: false },
{ backupRetention: 2, createSubfolderPerProfile: false },
Expand Down

0 comments on commit 871c579

Please sign in to comment.