diff --git a/test/scripts/helpers/is.js b/test/scripts/helpers/is.js index 37c062c5e1..9b2c5d0865 100644 --- a/test/scripts/helpers/is.js +++ b/test/scripts/helpers/is.js @@ -5,7 +5,7 @@ describe('is', () => { const hexo = new Hexo(__dirname); const is = require('../../../lib/plugins/helper/is'); - it('is_current', async() => { + it('is_current', async () => { await is.current.call({path: 'index.html', config: hexo.config}).should.eql(true); await is.current.call({path: 'tags/index.html', config: hexo.config}).should.eql(false); await is.current.call({path: 'index.html', config: hexo.config}, '/').should.eql(true); @@ -20,28 +20,28 @@ describe('is', () => { await is.current.call({path: 'foo/bar', config: hexo.config}, 'foo/baz').should.eql(false); }); - it('is_home', async() => { + it('is_home', async () => { await is.home.call({page: {__index: true}}).should.eql(true); await is.home.call({page: {}}).should.eql(false); }); - it('is_post', async() => { + it('is_post', async () => { await is.post.call({page: {__post: true}}).should.eql(true); await is.post.call({page: {}}).should.eql(false); }); - it('is_page', async() => { + it('is_page', async () => { await is.page.call({page: {__page: true}}).should.eql(true); await is.page.call({page: {}}).should.eql(false); }); - it('is_archive', async() => { + it('is_archive', async () => { await is.archive.call({page: {}}).should.eql(false); await is.archive.call({page: {archive: true}}).should.eql(true); await is.archive.call({page: {archive: false}}).should.eql(false); }); - it('is_year', async() => { + it('is_year', async () => { await is.year.call({page: {}}).should.eql(false); await is.year.call({page: {archive: true}}).should.eql(false); await is.year.call({page: {archive: true, year: 2014}}).should.eql(true); @@ -50,7 +50,7 @@ describe('is', () => { await is.year.call({page: {archive: true, year: 2014, month: 10}}).should.eql(true); }); - it('is_month', async() => { + it('is_month', async () => { await is.month.call({page: {}}).should.eql(false); await is.month.call({page: {archive: true}}).should.eql(false); await is.month.call({page: {archive: true, year: 2014}}).should.eql(false); @@ -62,14 +62,14 @@ describe('is', () => { await is.month.call({page: {archive: true, year: 2014, month: 10}}, 12).should.eql(false); }); - it('is_category', async() => { + it('is_category', async () => { await is.category.call({page: {category: 'foo'}}).should.eql(true); await is.category.call({page: {category: 'foo'}}, 'foo').should.eql(true); await is.category.call({page: {category: 'foo'}}, 'bar').should.eql(false); await is.category.call({page: {}}).should.eql(false); }); - it('is_tag', async() => { + it('is_tag', async () => { await is.tag.call({page: {tag: 'foo'}}).should.eql(true); await is.tag.call({page: {tag: 'foo'}}, 'foo').should.eql(true); await is.tag.call({page: {tag: 'foo'}}, 'bar').should.eql(false);