-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
This would also close #22 #21 and #20.
It's possible to load the page asynchronously in jsdom & then add jquery. This allows the querying of computed css values.
Here is some code that works:
before(async function() {
let jsdom = await JSDOM.fromFile("05/index.html", {
resources: "usable",
runScripts: "dangerously"
});
await new Promise(resolve =>
jsdom.window.addEventListener("load", resolve)
);
let window = jsdom.window;
let {document } = global.document = window;
// global scope absolutely required unfortunately
let $ = global.$ = require('jquery')(window);
});tests then become generally more reliable.
working on this in another branch.
Metadata
Metadata
Assignees
Labels
No labels