diff --git a/src/main/pathToFileURL.test.ts b/src/main/pathToFileURL.test.ts index 212b1e39..17b3b895 100644 --- a/src/main/pathToFileURL.test.ts +++ b/src/main/pathToFileURL.test.ts @@ -25,11 +25,11 @@ describe('file uri both platforms', () => { test('converts path to file url', () => { expect(pathToFileURL('/test.jpg').href).toMatch(/^file:\/{3}.*test\.jpg$/); - expect(pathToFileURL('/Users/sindresorhus/dev/te^st.jpg').href).toMatch(/^file:\/{2}.*\/Users\/sindresorhus\/dev\/te\^st\.jpg$/); + expect(pathToFileURL('/Users/sindresorhus/dev/te^st.jpg').href).toMatch(/^file:\/{2}.*\/Users\/sindresorhus\/dev\/te%5Est\.jpg$/); }); test('escapes more special characters in path', () => { - expect(pathToFileURL('/a^?!@#$%&\'";<>').href).toMatch(/^file:\/{3}.*a\^%3F!@%23\$%25&'%22;%3C%3E$/); + expect(pathToFileURL('/a^?!@#$%&\'";<>').href).toMatch(/^file:\/{3}.*a%5E%3F!@%23\$%25&'%22;%3C%3E$/); }); test('escapes whitespace characters in path', () => {