We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd0d378 commit 2a4fc33Copy full SHA for 2a4fc33
test/scripts/filters/meta_generator.js
@@ -15,13 +15,13 @@ describe('Meta Generator', () => {
15
});
16
17
it('empty <head>', () => {
18
- const content = '<head></head>';
+ const content = '<head><link rel=""/></head><body><head></head></body>';
19
const result = metaGenerator(content);
20
21
// meta generator should not be prepended if <head> tag is empty
22
// see https://github.com/hexojs/hexo/pull/3315
23
- const resultType = typeof result;
24
- resultType.should.eql('undefined');
+ const $ = cheerio.load(result);
+ $('meta[name="generator"]').length.should.eql(1);
25
26
27
it('disable meta_generator', () => {
0 commit comments