From 2503128fb692e3051ff243925dd81362577fbb95 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 12 Mar 2025 11:10:33 +0900 Subject: [PATCH] adjust test due to changed behavior in nodejs minor version https://github.com/nodejs/node/releases/tag/v20.18.3 https://github.com/nodejs/node/pull/54545 --- src/main/pathToFileURL.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', () => {