2021-01-22 15:01:10 +01:00
|
|
|
import "jasmine";
|
|
|
|
import {HtmlUtils} from "../../../src/WebRtc/HtmlUtils";
|
|
|
|
|
|
|
|
describe("urlify()", () => {
|
|
|
|
it("should transform an url into a link", () => {
|
|
|
|
const text = HtmlUtils.urlify('https://google.com');
|
2021-02-11 14:49:32 +01:00
|
|
|
expect(text.innerHTML).toEqual('<a href="https://google.com" target="_blank" style=":visited {color: white}">https://google.com</a>');
|
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 14:49:32 +01:00
|
|
|
expect(text.innerHTML).toEqual('hello');
|
2021-01-22 15:01:10 +01:00
|
|
|
});
|
|
|
|
});
|