1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00
This commit is contained in:
Junyoung Choi
2020-04-16 00:08:01 +09:00
parent 461e24bf39
commit 667fd3a601

View File

@@ -685,19 +685,19 @@ it('should remove the all ":storage" and noteKey references', function() {
' <p data-line="2">\n' + ' <p data-line="2">\n' +
' <img src="' + ' <img src="' +
storageFolder + storageFolder +
path.sep + path.posix.sep +
'0.6r4zdgc22xp.png" alt="dummyImage.png" >\n' + '0.6r4zdgc22xp.png" alt="dummyImage.png" >\n' +
' </p>\n' + ' </p>\n' +
' <p data-line="4">\n' + ' <p data-line="4">\n' +
' <a href="' + ' <a href="' +
storageFolder + storageFolder +
path.sep + path.posix.sep +
'0.q2i4iw0fyx.pdf">dummyPDF.pdf</a>\n' + '0.q2i4iw0fyx.pdf">dummyPDF.pdf</a>\n' +
' </p>\n' + ' </p>\n' +
' <p data-line="6">\n' + ' <p data-line="6">\n' +
' <img src="' + ' <img src="' +
storageFolder + storageFolder +
path.sep + path.posix.sep +
'd6c5ee92.jpg" alt="dummyImage2.jpg">\n' + 'd6c5ee92.jpg" alt="dummyImage2.jpg">\n' +
' </p>\n' + ' </p>\n' +
' </body>\n' + ' </body>\n' +
@@ -713,29 +713,29 @@ it('should make sure that "removeStorageAndNoteReferences" works with markdown c
const noteKey = 'noteKey' const noteKey = 'noteKey'
const testInput = const testInput =
'Test input' + 'Test input' +
'![' + '![imageName](' +
systemUnderTest.STORAGE_FOLDER_PLACEHOLDER + systemUnderTest.STORAGE_FOLDER_PLACEHOLDER +
path.win32.sep + path.win32.sep +
noteKey + noteKey +
path.win32.sep + path.win32.sep +
'image.jpg](imageName}) \n' + 'image.jpg) \n' +
'[' + '[pdf](' +
systemUnderTest.STORAGE_FOLDER_PLACEHOLDER + systemUnderTest.STORAGE_FOLDER_PLACEHOLDER +
path.posix.sep + path.posix.sep +
noteKey + noteKey +
path.posix.sep + path.posix.sep +
'pdf.pdf](pdf})' 'pdf.pdf)'
const expectedOutput = const expectedOutput =
'Test input' + 'Test input' +
'![' + '![imageName](' +
systemUnderTest.DESTINATION_FOLDER + systemUnderTest.DESTINATION_FOLDER +
path.sep + path.posix.sep +
'image.jpg](imageName}) \n' + 'image.jpg) \n' +
'[' + '[pdf](' +
systemUnderTest.DESTINATION_FOLDER + systemUnderTest.DESTINATION_FOLDER +
path.sep + path.posix.sep +
'pdf.pdf](pdf})' 'pdf.pdf)'
const actual = systemUnderTest.removeStorageAndNoteReferences( const actual = systemUnderTest.removeStorageAndNoteReferences(
testInput, testInput,
noteKey noteKey