diff options
author | ache <ache@ache.one> | 2020-05-08 04:25:53 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2020-05-08 04:25:53 +0200 |
commit | abd80cd6e2d61c61a7d042d7515b923dc8460d63 (patch) | |
tree | d3137c66332c16f2fbd59a0158f813dff6043b1b /__tests__ | |
parent | Update README.md (diff) |
Add support for autolinks
Diffstat (limited to '__tests__')
-rw-r--r-- | __tests__/index.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/__tests__/index.js b/__tests__/index.js index bce565b..6401426 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -125,9 +125,15 @@ test('image', t => { }); test('link', t => { - const linkMd = 'This is a link :[Test link](ache.one){ ping="http://ache.one/big.brother"}'; + const linkMd = 'This is a link :[Test link](ache.one){ ping="https://ache.one/big.brother"}'; const {contents} = render(linkMd); - t.deepEqual(parse(contents), parse('<p>This is a link :<a href="ache.one" ping="http://ache.one/big.brother">Test link</a></p>')); + t.deepEqual(parse(contents), parse('<p>This is a link :<a href="ache.one" ping="https://ache.one/big.brother">Test link</a></p>')); +}); + +test('autolink', t => { + const linkMd = 'This is a link :<https://ache.one>{ ping="https://ache.one/big.brother"}'; + const {contents} = render(linkMd); + t.deepEqual(parse(contents), parse('<p>This is a link :<a href="https://ache.one" ping="https://ache.one/big.brother">https://ache.one</a></p>')); }); test('header', t => { |