Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: comment out missing tests #3976

Merged
merged 3 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
// }));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

});
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