import { sanitiseCopy } from '../SanitiseCopy'; describe('SanitiseCopy', () => { it('sanitise html entities', async () => { const copy = sanitiseCopy('Spotify’s most popular songs'); expect(copy).toBe('Spotify’s most popular songs'); }); it('sanitise html tags', async () => { const copy = sanitiseCopy( '
Spotify’s most popular songs
' ); expect(copy).toBe('Spotify’s most popular songs'); }); it('sanitise with allowed tags', async () => { const copy = sanitiseCopy( '

Spotify’s most popular songs

', { br: {}, b: {}, i: {} } ); expect(copy).toBe('Spotify’s most popular songs

'); }); });