mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Fix for the broken test
This commit is contained in:
@@ -267,10 +267,10 @@ it('should delete the correct attachment folder if a note is deleted', function
|
||||
const storageKey = 'storageKey'
|
||||
const noteKey = 'noteKey'
|
||||
findStorage.findStorage = jest.fn(() => dummyStorage)
|
||||
sander.rimraf = jest.fn()
|
||||
sander.rimrafSync = jest.fn()
|
||||
|
||||
const expectedPathToBeDeleted = path.join(dummyStorage.path, systemUnderTest.DESTINATION_FOLDER, noteKey)
|
||||
systemUnderTest.deleteAttachmentFolder(storageKey, noteKey)
|
||||
expect(findStorage.findStorage).toHaveBeenCalledWith(storageKey)
|
||||
expect(sander.rimraf).toHaveBeenCalledWith(expectedPathToBeDeleted)
|
||||
expect(sander.rimrafSync).toHaveBeenCalledWith(expectedPathToBeDeleted)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user