import { splitHtml, SplittedHtml } from './HtmlToHtml'; describe('HtmlToHtml', () => { test('should split an HTML string into HTML and CSS', () => { const testCases: [string, SplittedHtml][] = [ [ '', { html: '', css: '', }, ], [ '\n
hello
\n

another line

', { html: '\n
hello
\n

another line

', css: 'b { font-weight: bold; }', }, ], [ '\n
hello
', { html: '\n
hello
', css: 'b { font-weight: bold; }', }, ], [ '\n
hello
', { html: '\n
hello
', css: '', }, ], ]; for (const t of testCases) { const [input, expected] = t; const actual = splitHtml(input); expect(actual).toEqual(expected); } }); });