mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-28 17:35:53 +08:00
preperation to run the code in nodejs
This commit is contained in:
10
test/_loader.js
Normal file
10
test/_loader.js
Normal file
@@ -0,0 +1,10 @@
|
||||
require = require('esm')(module/*, options*/)
|
||||
const {JSDOM} = require('jsdom')
|
||||
const dom = new JSDOM('<!DOCTYPE html><body></body>')
|
||||
|
||||
global.window = dom.window
|
||||
global.document = dom.window.document
|
||||
global.navigator = dom.window.navigator
|
||||
global.location = dom.window.location
|
||||
|
||||
require('../src/core')
|
||||
Reference in New Issue
Block a user