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 11, 2019
1 parent 61efaa6 commit 9c91d97
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 All @@ -36,11 +37,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 9c91d97

Please sign in to comment.