File tree 3 files changed +21
-1
lines changed
packages/docsify-server-renderer
3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -197,4 +197,6 @@ export default class Renderer {
197
197
}
198
198
}
199
199
200
+ export { Renderer } ;
201
+
200
202
Renderer . version = '__VERSION__' ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ready(callback) {
22
22
module . exports . initJSDOM = initJSDOM ;
23
23
24
24
/** @param {string } markup - The HTML document to initialize JSDOM with. */
25
- function initJSDOM ( markup , options = { } ) {
25
+ function initJSDOM ( markup = '' , options = { } ) {
26
26
const dom = new JSDOM ( markup , options ) ;
27
27
28
28
global . window = dom . window ;
Original file line number Diff line number Diff line change
1
+ // @ts -check
2
+ /* eslint-disable no-global-assign */
3
+ require = require ( 'esm' ) (
4
+ module /* , options */
5
+ ) ; /* eslint-disable-line no-global-assign */
6
+ const { expect } = require ( 'chai' ) ;
7
+ const { initJSDOM } = require ( '../_helper' ) ;
8
+
9
+ initJSDOM ( ) ;
10
+
11
+ const { Renderer } = require ( '../../packages/docsify-server-renderer/index' ) ;
12
+
13
+ describe ( 'pacakges/docsify-server-render' , function ( ) {
14
+ it ( 'toURL' , function ( ) {
15
+ expect ( Renderer ) . to . be . an . instanceof ( Function ) ;
16
+ expect ( 'foo' ) . equal ( 'foo' ) ;
17
+ } ) ;
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments