Skip to content

Commit

Permalink
test(meta_generator): tag should be added only once
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Aug 11, 2019
1 parent cd0d378 commit 2a4fc33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/scripts/filters/meta_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ describe('Meta Generator', () => {
});

it('empty <head>', () => {
const content = '<head></head>';
const content = '<head><link rel=""/></head><body><head></head></body>';
const result = metaGenerator(content);

// meta generator should not be prepended if <head> tag is empty
// see https://github.com/hexojs/hexo/pull/3315
const resultType = typeof result;
resultType.should.eql('undefined');
const $ = cheerio.load(result);
$('meta[name="generator"]').length.should.eql(1);
});

it('disable meta_generator', () => {
Expand Down

0 comments on commit 2a4fc33

Please sign in to comment.