Skip to content

Commit

Permalink
test(external_link): render content directly
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Aug 26, 2019
1 parent 0d8558e commit 4774444
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/scripts/filters/external_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('External link', () => {
hexo.config.external_link = false;

externalLink(data);

data.content.should.eql(content);
hexo.config.external_link = true;
});
Expand Down Expand Up @@ -46,11 +47,9 @@ describe('External link', () => {
'<a href="https://example.com">Example Domain</a>'
].join('\n');

const data = {content};

externalLink(data);
const result = externalLink(content);

data.content.should.eql([
result.should.eql([
'# External link test',
'1. External link',
'<a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>',
Expand Down

0 comments on commit 4774444

Please sign in to comment.