1 import {HtmlToTxtService} from './htmltotxt.service';
3 let h2txt: HtmlToTxtService;
6 h2txt = new HtmlToTxtService();
9 describe('HtmlToTxtService', () => {
10 it('htmlToTxt cleans multiline comments', () => {
11 // this is a regression test for LP#1857710 on Firefox
12 const str = '<h1>A print template</h1> <!-- I am a comment\nwith an embedded newline --> <div>body of template</div>';
13 expect(h2txt.htmlToTxt(str)).toEqual('A print template body of template');