chore: backup service test
This commit is contained in:
@@ -48,6 +48,7 @@ describe('backup service', () => {
|
||||
device = {} as jest.Mocked<FileBackupsDevice>
|
||||
device.getFileBackupReadToken = jest.fn()
|
||||
device.readNextChunk = jest.fn()
|
||||
device.joinPaths = jest.fn()
|
||||
|
||||
session = {} as jest.Mocked<SessionsClientInterface>
|
||||
|
||||
@@ -84,6 +85,7 @@ describe('backup service', () => {
|
||||
history,
|
||||
internalEventBus,
|
||||
)
|
||||
backupService.getFilesBackupsLocation = jest.fn().mockReturnValue('/')
|
||||
|
||||
crypto.xchacha20StreamInitDecryptor = jest.fn().mockReturnValue({
|
||||
state: {},
|
||||
|
||||
@@ -463,7 +463,7 @@ export class FilesBackupService extends AbstractService implements BackupService
|
||||
return 'failed'
|
||||
}
|
||||
|
||||
const fileBackupsLocation = await this.getFilesBackupsLocation()
|
||||
const fileBackupsLocation = this.getFilesBackupsLocation()
|
||||
|
||||
if (!fileBackupsLocation) {
|
||||
return 'failed'
|
||||
|
||||
Reference in New Issue
Block a user