mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix: format
This commit is contained in:
parent
f95b040b07
commit
ac4285b9f2
@ -205,10 +205,7 @@ describe('BackupManager.deleteTempBackup - Security Tests', () => {
|
||||
const result = await backupManager.deleteTempBackup({} as Electron.IpcMainInvokeEvent, validPath)
|
||||
|
||||
expect(result).toBe(false)
|
||||
expect(mockLogger.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining('Failed to delete'),
|
||||
expect.any(Error)
|
||||
)
|
||||
expect(mockLogger.error).toHaveBeenCalledWith(expect.stringContaining('Failed to delete'), expect.any(Error))
|
||||
})
|
||||
|
||||
it('should return false on fs.pathExists error', async () => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { EventEmitter } from 'events'
|
||||
import { afterEach, beforeEach, describe, expect, it, type Mock,vi } from 'vitest'
|
||||
import { afterEach, beforeEach, describe, expect, it, type Mock, vi } from 'vitest'
|
||||
|
||||
// Create mock objects before vi.mock calls
|
||||
const mockLogger = {
|
||||
|
||||
@ -96,7 +96,6 @@ describe('LanTransferClientService', () => {
|
||||
})
|
||||
).rejects.toThrow('Unable to resolve a reachable host for the peer')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
describe('cancelTransfer', () => {
|
||||
|
||||
@ -4,7 +4,13 @@ import type { Socket } from 'node:net'
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { abortTransfer, cleanupTransfer, createTransferState, formatFileSize, streamFileChunks } from '../../handlers/fileTransfer'
|
||||
import {
|
||||
abortTransfer,
|
||||
cleanupTransfer,
|
||||
createTransferState,
|
||||
formatFileSize,
|
||||
streamFileChunks
|
||||
} from '../../handlers/fileTransfer'
|
||||
import type { ActiveFileTransfer } from '../../types'
|
||||
|
||||
// Mock binaryProtocol
|
||||
|
||||
Loading…
Reference in New Issue
Block a user