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';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
2
test/index.js
vendored
2
test/index.js
vendored
@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
|
||||
describe('NexT', () => {
|
||||
require('./helpers');
|
||||
require('./tags');
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
|
||||
const result = `<div class="link-grid"><div class="link-grid-container">
|
||||
<object class="link-grid-image" data="/images/sample.png"></object>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
|
||||
const { escapeHTML } = require('hexo-util');
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
const Hexo = require('hexo');
|
||||
const hexo = new Hexo();
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
require('chai').should();
|
||||
|
||||
describe('video', () => {
|
||||
const postVideo = require('../../scripts/tags/video');
|
||||
|
||||
@ -3,26 +3,25 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const yaml = require('js-yaml');
|
||||
const should = require('chai').should();
|
||||
|
||||
describe('Validate', () => {
|
||||
it('config', () => {
|
||||
const themeConfig = fs.readFileSync(path.join(__dirname, '../../_config.yml'));
|
||||
should.not.throw(() => {
|
||||
(() => {
|
||||
yaml.load(themeConfig);
|
||||
});
|
||||
}).should.not.throw();
|
||||
});
|
||||
|
||||
it('vendors', () => {
|
||||
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../_vendors.yml'));
|
||||
should.not.throw(() => {
|
||||
(() => {
|
||||
yaml.load(vendorsFile);
|
||||
});
|
||||
}).should.not.throw();
|
||||
});
|
||||
|
||||
it('language', () => {
|
||||
const languagesPath = path.join(__dirname, '../../languages');
|
||||
should.not.throw(() => {
|
||||
(() => {
|
||||
fs.readdirSync(languagesPath).forEach(lang => {
|
||||
if (!lang.endsWith('.yml')) return;
|
||||
const languagePath = path.join(languagesPath, lang);
|
||||
@ -30,6 +29,6 @@ describe('Validate', () => {
|
||||
filename: path.relative(__dirname, languagePath)
|
||||
});
|
||||
});
|
||||
});
|
||||
}).should.not.throw();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user