File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
packages/docsify-server-renderer Expand file tree Collapse file tree 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 {
197197 }
198198}
199199
200+ export { Renderer } ;
201+
200202Renderer . version = '__VERSION__' ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function ready(callback) {
2222module . exports . initJSDOM = initJSDOM ;
2323
2424/** @param {string } markup - The HTML document to initialize JSDOM with. */
25- function initJSDOM ( markup , options = { } ) {
25+ function initJSDOM ( markup = '' , options = { } ) {
2626 const dom = new JSDOM ( markup , options ) ;
2727
2828 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