]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/share/util/htmltotxt.service.spec.ts
LP#1857710: fix Angular client whitescreen on Firefox
[Evergreen.git] / Open-ILS / src / eg2 / src / app / share / util / htmltotxt.service.spec.ts
1 import {HtmlToTxtService} from './htmltotxt.service';
2
3 let h2txt: HtmlToTxtService;
4
5 beforeEach(() => {
6     h2txt = new HtmlToTxtService();
7 });
8
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');
14     });
15 });