Merge pull request #34 from mifi/master

[pull] master from mifi:master
pull[bot] 1 year ago committed by GitHub
commit 0062ed9581
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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', () => {

Loading…
Cancel
Save