mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Update test script
This commit is contained in:
parent
5f4210feab
commit
8699177369
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
2
test/index.js
vendored
2
test/index.js
vendored
@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
require('chai').should();
|
||||||
|
|
||||||
describe('NexT', () => {
|
describe('NexT', () => {
|
||||||
require('./helpers');
|
require('./helpers');
|
||||||
require('./tags');
|
require('./tags');
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
|
|
||||||
const result = `<div class="link-grid"><div class="link-grid-container">
|
const result = `<div class="link-grid"><div class="link-grid-container">
|
||||||
<object class="link-grid-image" data="/images/sample.png"></object>
|
<object class="link-grid-image" data="/images/sample.png"></object>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
|
|
||||||
const { escapeHTML } = require('hexo-util');
|
const { escapeHTML } = require('hexo-util');
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
const Hexo = require('hexo');
|
const Hexo = require('hexo');
|
||||||
const hexo = new Hexo();
|
const hexo = new Hexo();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chai').should();
|
|
||||||
|
|
||||||
describe('video', () => {
|
describe('video', () => {
|
||||||
const postVideo = require('../../scripts/tags/video');
|
const postVideo = require('../../scripts/tags/video');
|
||||||
|
|||||||
@ -3,26 +3,25 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
const should = require('chai').should();
|
|
||||||
|
|
||||||
describe('Validate', () => {
|
describe('Validate', () => {
|
||||||
it('config', () => {
|
it('config', () => {
|
||||||
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
||||||
should.not.throw(() => {
|
(() => {
|
||||||
yaml.load(themeConfig);
|
yaml.load(themeConfig);
|
||||||
});
|
}).should.not.throw();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('vendors', () => {
|
it('vendors', () => {
|
||||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
||||||
should.not.throw(() => {
|
(() => {
|
||||||
yaml.load(vendorsFile);
|
yaml.load(vendorsFile);
|
||||||
});
|
}).should.not.throw();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('language', () => {
|
it('language', () => {
|
||||||
const languagesPath = path.join(__dirname, '../../languages');
|
const languagesPath = path.join(__dirname, '../../languages');
|
||||||
should.not.throw(() => {
|
(() => {
|
||||||
fs.readdirSync(languagesPath).forEach(lang => {
|
fs.readdirSync(languagesPath).forEach(lang => {
|
||||||
if (!lang.endsWith('.yml')) return;
|
if (!lang.endsWith('.yml')) return;
|
||||||
const languagePath = path.join(languagesPath, lang);
|
const languagePath = path.join(languagesPath, lang);
|
||||||
@ -30,6 +29,6 @@ describe('Validate', () => {
|
|||||||
filename: path.relative(__dirname, languagePath)
|
filename: path.relative(__dirname, languagePath)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
}).should.not.throw();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user