2021-01-22 15:01:10 +01:00
|
|
|
import "jasmine";
|
|
|
|
|
|
|
|
describe("urlify()", () => {
|
2021-02-11 18:03:14 +01:00
|
|
|
// FIXME: we need to add PhantomJS to have a good mock for "document".
|
|
|
|
/*it("should transform an url into a link", () => {
|
|
|
|
const text = HtmlUtils.urlify('foo https://google.com bar');
|
|
|
|
expect(text).toEqual('foo <a href="https://google.com" target="_blank" style=":visited {color: white}">https://google.com</a> bar');
|
2021-01-22 15:01:10 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should not transform a normal text into a link", () => {
|
|
|
|
const text = HtmlUtils.urlify('hello');
|
2021-02-11 18:03:14 +01:00
|
|
|
expect(text).toEqual('hello');
|
2021-01-22 15:01:10 +01:00
|
|
|
});
|
2021-02-11 18:03:14 +01:00
|
|
|
|
|
|
|
it("should escape HTML", () => {
|
|
|
|
const text = HtmlUtils.urlify('<h1>boo</h1>');
|
|
|
|
expect(text).toEqual('<h1>boo</h1>');
|
|
|
|
});*/
|
|
|
|
});
|