Spaces:
Build error
Build error
File size: 591 Bytes
d9494a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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)');
});
});
|