twenty / packages /twenty-shared /src /utils /url /__tests__ /safeDecodeURIComponent.test.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
496 Bytes
import { safeDecodeURIComponent } from '@/utils/url/safeDecodeURIComponent';
describe('safeDecodeURIComponent', () => {
it('should decode valid encoded components', () => {
expect(safeDecodeURIComponent('hello%20world')).toBe('hello world');
});
it('should return malformed input as-is', () => {
expect(safeDecodeURIComponent('%E0%A4%A')).toBe('%E0%A4%A');
});
it('should return plain text as-is', () => {
expect(safeDecodeURIComponent('hello')).toBe('hello');
});
});