1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop, CLI: Allow importing Evernote task lists (#8440)

This commit is contained in:
Rob Moffat
2023-07-11 13:39:49 +01:00
committed by GitHub
parent 7e53a41a30
commit 0071a05a6c
6 changed files with 155 additions and 6 deletions

View File

@@ -22,7 +22,6 @@ describe('import-enex-md-gen', () => {
it('should convert ENEX content to Markdown', async () => {
const files = await shim.fsDriver().readDirStats(enexSampleBaseDir);
for (let i = 0; i < files.length; i++) {
const htmlFilename = files[i].path;
if (htmlFilename.indexOf('.html') < 0) continue;
@@ -108,6 +107,14 @@ describe('import-enex-md-gen', () => {
expect(all[0].size).toBe(0);
});
it('should handle tasks', async () => {
const filePath = `${enexSampleBaseDir}/tasks.enex`;
await importEnex('', filePath);
const expectedMd = await shim.fsDriver().readFile(`${enexSampleBaseDir}/tasks.md`);
const note: NoteEntity = (await Note.all())[0];
expect(note.body).toEqual(expectedMd);
});
it('should handle empty note content', async () => {
const filePath = `${enexSampleBaseDir}/empty_content.enex`;
await expectNotThrow(() => importEnex('', filePath));