Update to use Anchor html
This commit is contained in:
parent
f98b107bb7
commit
0d104cb307
3 changed files with 15 additions and 7 deletions
|
@ -4,11 +4,11 @@ import {HtmlUtils} from "../../../src/WebRtc/HtmlUtils";
|
|||
describe("urlify()", () => {
|
||||
it("should transform an url into a link", () => {
|
||||
const text = HtmlUtils.urlify('https://google.com');
|
||||
expect(text).toEqual('<a href="https://google.com" target="_blank" style=":visited {color: white}">https://google.com</a>');
|
||||
expect(text.innerHTML).toEqual('<a href="https://google.com" target="_blank" style=":visited {color: white}">https://google.com</a>');
|
||||
});
|
||||
|
||||
it("should not transform a normal text into a link", () => {
|
||||
const text = HtmlUtils.urlify('hello');
|
||||
expect(text).toEqual('hello');
|
||||
expect(text.innerHTML).toEqual('hello');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue