Skip to content

Commit

Permalink
Merge pull request #4015 from SukkaW/style-test-helper-is
Browse files Browse the repository at this point in the history
style(test-helper-is): asyncArrow space
  • Loading branch information
curbengh authored Dec 30, 2019
2 parents f972a9d + 191377b commit 80777a8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/scripts/helpers/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 80777a8

Please sign in to comment.