diff --git a/src/utils/decrypt.ts b/src/utils/decrypt.ts index 5048ca6e..5756b4b3 100644 --- a/src/utils/decrypt.ts +++ b/src/utils/decrypt.ts @@ -71,4 +71,5 @@ export const performDecryption = (encryptedText: string, passwords: Array { + const options: YarleOptions = { +dateFormat: undefined, + enexSources: [ `.${path.sep}test${path.sep}data${path.sep}test-encryption.enex` ], + outputDir: 'out', + outputFormat: OutputFormat.ObsidianMD, + convertPlainHtmlNewlines: true, + isMetadataNeeded: true, + encryptionPasswords: ["wrong_password"] + }; + await yarle.dropTheRope(options); + // tslint:disable-next-line:no-console + assert.equal( + fs.existsSync( + `${__dirname}/../out/notes/test-encryption/Encryption.md`, + ), + true, + ); + + assert.equal( + eol.auto(fs.readFileSync( + `${__dirname}/../out/notes/test-encryption/Encryption.md`, + 'utf8', + )), + fs.readFileSync(`${__dirname}/data/test-encryption-nopassword.md`, 'utf8'), + ); + }); it('Enex file with note containing a picture', async () => { const options: YarleOptions = { dateFormat: undefined,