mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
When storage or folder is removed, Detail components should render without error (#3168)
* optimize: when storage or folder is removed, Detail components should render without error, fix #2876 * optimize: Handle some scenarios where storage is not found, should not break the renderer * optimize: NoteList should work without error when storage is not found
This commit is contained in:
@@ -912,6 +912,19 @@ it('should test that getAttachmentsPathAndStatus return null if noteKey, storage
|
||||
expect(result).toBeNull()
|
||||
})
|
||||
|
||||
it('should test that getAttachmentsPathAndStatus return null if no storage found', function() {
|
||||
const noteKey = 'test'
|
||||
const storageKey = 'not_exist'
|
||||
const markdownContent = ''
|
||||
|
||||
const result = systemUnderTest.getAttachmentsPathAndStatus(
|
||||
markdownContent,
|
||||
storageKey,
|
||||
noteKey
|
||||
)
|
||||
expect(result).toBeNull()
|
||||
})
|
||||
|
||||
it('should test that getAttachmentsPathAndStatus return the correct path and status for attachments', async function() {
|
||||
const dummyStorage = { path: 'dummyStoragePath' }
|
||||
const noteKey = 'noteKey'
|
||||
|
||||
Reference in New Issue
Block a user