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

chore: update to hexo-util@1.0.1 and hexo-renderer-marked@2.0.0 #3646

Merged
merged 9 commits into from Aug 30, 2019
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -45,7 +45,7 @@
"hexo-fs": "^1.0.0",
"hexo-i18n": "^0.2.1",
"hexo-log": "^0.2.0",
"hexo-util": "^0.6.3",
"hexo-util": "1.0.0",
"js-yaml": "^3.12.0",
"lodash": "^4.17.11",
"micromatch": "^4.0.2",
Expand All @@ -69,7 +69,7 @@
"chai-as-promised": "^7.1.1",
"eslint": "^6.0.1",
"eslint-config-hexo": "^3.0.0",
"hexo-renderer-marked": "^1.0.1",
"hexo-renderer-marked": "2.0.0-rc3",
curbengh marked this conversation as resolved.
Show resolved Hide resolved
"husky": "^3.0.0",
"lint-staged": "^9.1.0",
"mocha": "^6.0.0",
Expand Down
12 changes: 6 additions & 6 deletions test/scripts/tags/asset_img.js
Expand Up @@ -37,27 +37,27 @@ describe('asset_img', () => {
}));

it('default', () => {
assetImg('bar').should.eql('<img src="/foo/bar">');
assetImg('bar').should.eql('<img src="/foo/bar" class="">');
});

it('default', () => {
assetImg('bar title').should.eql('<img src="/foo/bar" title="title">');
assetImg('bar title').should.eql('<img src="/foo/bar" class="" title="title">');
});

it('with space', () => {
// {% asset_img "spaced asset" "spaced title" %}
assetImgTag.call(post, ['spaced asset', 'spaced title'])
.should.eql('<img src="/foo/spaced%20asset" title="spaced title">');
.should.eql('<img src="/foo/spaced%20asset" class="" title="spaced title">');
});

it('with alt and title', () => {
assetImgTag.call(post, ['bar', '"title"', '"alt"'])
.should.eql('<img src="/foo/bar" title="title" alt="alt">');
.should.eql('<img src="/foo/bar" class="" title="title" alt="alt">');
});

it('with width height alt and title', () => {
assetImgTag.call(post, ['bar', '100', '200', '"title"', '"alt"'])
.should.eql('<img src="/foo/bar" width="100" height="200" title="title" alt="alt">');
.should.eql('<img src="/foo/bar" class="" width="100" height="200" title="title" alt="alt">');
});

it('no slug', () => {
Expand All @@ -70,6 +70,6 @@ describe('asset_img', () => {

it('with root path', () => {
hexo.config.root = '/root/';
assetImg('bar').should.eql('<img src="/root/foo/bar">');
assetImg('bar').should.eql('<img src="/root/foo/bar" class="">');
});
});
5 changes: 3 additions & 2 deletions test/scripts/tags/link.js
Expand Up @@ -23,7 +23,8 @@ describe('link', () => {

$('a').attr('href').should.eql('https://google.com');
$('a').html().should.eql('Click here to Google');
should.not.exist($('a').attr('target'));
$('a').attr('title').should.eql('');
$('a').attr('target').should.eql('');
});

it('text + url + title', () => {
Expand All @@ -46,7 +47,7 @@ describe('link', () => {

$('a').attr('href').should.eql('https://google.com');
$('a').html().should.eql('Click here to Google');
should.not.exist($('a').attr('target'));
$('a').attr('target').should.eql('');
$('a').attr('title').should.eql('Google link');
});
});