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

Desktop: Fixes #5693: Opening a file with ctrl and click leads to an error in the Rich Text editor

This commit is contained in:
Laurent Cozic
2021-11-22 17:17:28 +00:00
parent 73737ce776
commit 0e11273c45
10 changed files with 359 additions and 191 deletions

View File

@@ -71,4 +71,13 @@ describe('urlUtils', function() {
}
}));
it('should convert a file URI to a file path', (async () => {
// This function is a wrapper around the file-uri-to-path module,
// with a fix for the Windows paths. We assume that the wrapped
// function works so we don't test everything, only the cases
// specific to our wrapper.
expect(urlUtils.fileUriToPath('file://c:/not/quite/right')).toBe('c:\\not\\quite\\right');
expect(urlUtils.fileUriToPath('file:///d:/better')).toBe('d:\\better');
}));
});