twenty / packages /twenty-shared /src /utils /strings /__tests__ /appendCopySuffix.test.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
591 Bytes
import { appendCopySuffix } from '@/utils/strings/appendCopySuffix';
describe('appendCopySuffix', () => {
it('should add (Copy) suffix to a string', () => {
expect(appendCopySuffix('My Dashboard')).toBe('My Dashboard (Copy)');
});
it('should not add (Copy) suffix if string already ends with (Copy)', () => {
expect(appendCopySuffix('My Dashboard (Copy)')).toBe('My Dashboard (Copy)');
});
it('should not add (Copy) suffix if string ends with (copy) - case insensitive', () => {
expect(appendCopySuffix('My Dashboard (copy)')).toBe('My Dashboard (copy)');
});
});