This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If you are use to pre-version 10 jsdom, post 10 is an absolute nuisance for loading scripts...especially when you just | |
* want to test some code. | |
* This just creates a nice little wrapper to simplify everythign. | |
**/ | |
const __jsdom = require("jsdom"); | |
const { JSDOM } = __jsdom; | |
global.jsdom = function(html = '', scripts = []){ | |
return new Promise((resolve, reject)=>{ |
OlderNewer