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