Skip to content

Commit c5e4a45

Browse files
committed
test: add meta_generator helper
1 parent cad4b87 commit c5e4a45

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/scripts/helpers/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('Helpers', () => {
1919
require('./list_tags');
2020
require('./mail_to');
2121
require('./markdown');
22+
require('./meta_generator');
2223
require('./number_format');
2324
require('./open_graph');
2425
require('./paginator');
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
describe('meta_generator', () => {
4+
const Hexo = require('../../../lib/hexo');
5+
const hexo = new Hexo();
6+
7+
const metaGeneratorHelper = require('../../../lib/plugins/helper/meta_generator').bind(hexo);
8+
9+
it('default', () => {
10+
metaGeneratorHelper().should.eql(`<meta name="generator" content="Hexo ${hexo.version}">`);
11+
});
12+
});

0 commit comments

Comments
 (0)