Skip to content

Commit 3552c92

Browse files
authored
Update hexo.js
1 parent 931afed commit 3552c92

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/scripts/hexo/hexo.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ var sep = pathFn.sep;
77
var testUtil = require('../../util');
88

99
describe('Hexo', () => {
10+
var base_dir = pathFn.join(__dirname, 'hexo_test');
1011
var Hexo = require('../../../lib/hexo');
11-
var hexo = new Hexo(pathFn.join(__dirname, 'hexo_test'), {silent: true});
12+
var hexo = new Hexo(base_dir, {silent: true});
1213
var coreDir = pathFn.join(__dirname, '../../..');
1314
var version = require('../../../package.json').version;
1415
var Post = hexo.model('Post');
@@ -65,6 +66,13 @@ describe('Hexo', () => {
6566
hexo.config_path.should.eql(pathFn.join(__dirname, '_config.yml'));
6667
});
6768

69+
it('constructs mutli-config', () => {
70+
var configs = [ '../../../fixtures/_config.json', '../../../fixtures/_config.json' ];
71+
var args = { _: [], config: configs.join(',') };
72+
var hexo = new Hexo(base_dir, args);
73+
hexo.config_path.should.eql(pathFn.join(base_dir, '_multiconfig.yml'));
74+
});
75+
6876
it('call()', () => hexo.call('test', {foo: 'bar'}).then(data => {
6977
data.should.eql({foo: 'bar'});
7078
}));

0 commit comments

Comments
 (0)