preperation to run the code in nodejs
This commit is contained in:
parent
69ef489210
commit
fd86c727af
5 changed files with 694 additions and 4 deletions
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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue