1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Merge branch 'master' of https://github.com/BoostIO/Boostnote into migrate-to-jest

This commit is contained in:
ZeroX-DG
2020-04-17 21:49:38 +12:00
5 changed files with 130 additions and 34 deletions

View File

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

View File

@@ -12,7 +12,7 @@ const originalDate = Date
let context = {}
beforeAll(() => {
const constantDate = new Date('2017-11-27T14:33:42Z')
const constantDate = new Date('2017-11-27T14:33:42')
global.Date = class extends Date {
constructor() {
super()