Skip to content

Commit

Permalink
Merge pull request #3976 from curbengh/test-missing
Browse files Browse the repository at this point in the history
test: comment out missing tests
  • Loading branch information
curbengh authored Dec 18, 2019
2 parents c82082c + caf41c4 commit 85855de
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/scripts/console/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('deploy', () => {
});
});

it('deployer not found');
// it('deployer not found'); missing-unit-test

it('generate', () => fs.writeFile(pathFn.join(hexo.source_dir, 'test.txt'), 'test').then(() => deploy({generate: true})).then(() => fs.readFile(pathFn.join(hexo.public_dir, 'test.txt'))).then(content => {
content.should.eql('test');
Expand Down
2 changes: 2 additions & 0 deletions test/scripts/console/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ describe('render', () => {
});
});

// it('output'); missing-unit-test

it('engine', () => {
const src = pathFn.join(hexo.base_dir, 'test');
const dest = pathFn.join(hexo.base_dir, 'result.json');
Expand Down
17 changes: 16 additions & 1 deletion test/scripts/helpers/list_archives.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,20 @@ describe('list_archives', () => {
].join(''));
});

it('timezone');
it('timezone', () => {
ctx.config.timezone = 'Asia/Tokyo';
const result = listArchives({
format: 'YYYY MM ZZ'
});

result.should.eql([
'<ul class="archive-list">',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/02/">2014 02 +0900</a><span class="archive-list-count">1</span></li>',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">2013 10 +0900</a><span class="archive-list-count">1</span></li>',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">2013 06 +0900</a><span class="archive-list-count">2</span></li>',
'</ul>'
].join(''));

ctx.config.timezone = '';
});
});
4 changes: 2 additions & 2 deletions test/scripts/hexo/hexo.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Hexo', () => {
});
});

it('model()');
// it('model()'); missing-unit-test

it('_showDrafts()', () => {
hexo._showDrafts().should.be.false;
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('Hexo', () => {

it('watch() - theme', () => testWatch(pathFn.join(hexo.theme_dir, 'source')));

it('unwatch()');
// it('unwatch()'); missing-unit-test

it('exit()', () => {
const hook = sinon.spy();
Expand Down
12 changes: 6 additions & 6 deletions test/scripts/hexo/load_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ describe('Load database', () => {

// I don't know why this test case can't pass on Windows
// It always throws EPERM error
it.skip('database load failed', () => fs.writeFile(dbPath, '{1423432: 324').then(() => loadDatabase(hexo)).then(() => {
hexo._dbLoaded.should.be.false;
return fs.exists(dbPath);
}).then(exist => {
exist.should.be.false;
}));
// it('database load failed', () => fs.writeFile(dbPath, '{1423432: 324').then(() => loadDatabase(hexo)).then(() => {
// hexo._dbLoaded.should.be.false;
// return fs.exists(dbPath);
// }).then(exist => {
// exist.should.be.false;
// }));
});
2 changes: 1 addition & 1 deletion test/scripts/models/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Category', () => {
});
});

it.skip('parent - reference');
// it('parent - reference'); missing-unit-test

it('slug - virtual', () => Category.insert({
name: 'foo'
Expand Down

0 comments on commit 85855de

Please sign in to comment.