forked from docsifyjs/docsify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.test.js
More file actions
44 lines (38 loc) 路 1.15 KB
/
Copy pathserver.test.js
File metadata and controls
44 lines (38 loc) 路 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// @ts-check
/* eslint-disable no-global-assign */
require = require('esm')(
module /* , options */
); /* eslint-disable-line no-global-assign */
const { expect } = require('chai');
const { initJSDOM } = require('../_helper');
// const port = 9754;
// const docsifySite = 'http://127.0.0.1:' + port;
initJSDOM();
const {
Renderer,
getDefaultTemplate,
} = require('../../packages/docsify-server-renderer/index');
describe('pacakges/docsify-server-render', function() {
it('renders content', async function() {
const renderer = new Renderer({
template: getDefaultTemplate(),
config: {
name: 'docsify',
repo: 'docsifyjs/docsify',
// basePath: 'https://docsify.js.org/',
loadNavbar: true,
loadSidebar: true,
subMaxLevel: 3,
auto2top: true,
alias: {
'/de-de/changelog': '/changelog',
'/zh-cn/changelog': '/changelog',
'/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG',
},
},
});
await renderer.renderToString('/changelog');
expect(renderer).to.be.an.instanceof(Renderer);
});
});