import { addWrapper, capitalizePrint, isRawHTML } from '../../src/js/functions' describe('addWrapper()', () => { it('add a div wrapper to a raw html', () => { const params = { font: 'TimesNewRoman', font_size: '12px' } expect(addWrapper('Test', params)).toBe('
Test
') }) }) describe('capitalizePrint()', () => { it('should capitalize the first letter of a string', () => { expect(capitalizePrint('test')).toBe('Test') }) }) describe('isRawHTML()', () => { it('string `My Header` return `false`', () => { expect(isRawHTML('My Header')).toBe(false) }) it('`

My HTML Header

` return `true`', () => { expect(isRawHTML('

My HTML Header

')).toBe(true) }) it('`

HTML syntax error` return `false`', () => { expect(isRawHTML('

HTML syntax error')).toBe(false) }) })