mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
might fixes #1786 --> export attachments for markdown notes
This commit is contained in:
@@ -319,6 +319,21 @@ it('should remove the all ":storage" and noteKey references', function () {
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
it('should make sure that "removeStorageAndNoteReferences" works with markdown content as well', function () {
|
||||
const noteKey = 'noteKey'
|
||||
const testInput =
|
||||
'Test input' +
|
||||
' \n' +
|
||||
'[' + systemUnderTest.STORAGE_FOLDER_PLACEHOLDER + path.sep + noteKey + path.sep + 'pdf.pdf](pdf})'
|
||||
|
||||
const expectedOutput =
|
||||
'Test input' +
|
||||
' \n' +
|
||||
'[' + systemUnderTest.DESTINATION_FOLDER + path.sep + 'pdf.pdf](pdf})'
|
||||
const actual = systemUnderTest.removeStorageAndNoteReferences(testInput, noteKey)
|
||||
expect(actual).toEqual(expectedOutput)
|
||||
})
|
||||
|
||||
it('should delete the correct attachment folder if a note is deleted', function () {
|
||||
const dummyStorage = {path: 'dummyStoragePath'}
|
||||
const storageKey = 'storageKey'
|
||||
|
||||
Reference in New Issue
Block a user