-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
Congratulations on the release, the changes look good!
Description
According to the npm package description, in order to use jQuery with JSDOM, you can now use a Factory:
const { JSDOM } = require( "jsdom" );
const { window } = new JSDOM( "" );
const { jQueryFactory } = require( "jquery/factory" );
const $ = jQueryFactory( window );When the library is installed through npm:
npm install [email protected]
The following files are available:
According to the package.json, there should be a factory in the dist and dist-module folders:
Link to test case
This is an issue with the bundle itself, rather than some particular jQuery functionality, but the test is rather simple:
- Install the package via NPM.
- Create a simple
test.jsfile with the following contents:
const { JSDOM } = require("jsdom");
const { window } = new JSDOM();
const { jQueryFactory } = require("jquery/factory");
const $ = jQuery = jQueryFactory( window );
console.log("success");
- And run it:
node test.js
I am guessing that the following array is the culprit:


