preperation to run the code in nodejs

This commit is contained in:
Anton Wilhelm
2019-01-30 08:48:34 +01:00
parent 69ef489210
commit fd86c727af
5 changed files with 694 additions and 4 deletions

10
test/_loader.js Normal file
View 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')