You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be great if inferno_hydrate could use a configurable dom object, as in
import{hydrate}from'inferno-hydrate';importjsdomfrom'jsdom'constdom=newjsdom.JSDOM('<!DOCTYPE html><body><div></div></body>')hydrate(createElement('div',{className: 'test'},"I'm a child!"),dom.window.document.body.firstChild,dom// optional, configurable dom definition );
This would allow inferno_hydrate to be used in concurrently running unit-tests inside a node runtime and without setting global dom variables. Currently, using inferno_hydrate inside node requires global variables and so concurrent tests cannot be used. eg, currently something like this is needed...
import{hydrate}from'inferno-hydrate';importjsdomfrom'jsdom'constdom=newjsdom.JSDOM('<!DOCTYPE html><body><div></div></body>')global.window=dom.windowglobal.document=dom.window.documenthydrate(createElement('div',{className: 'test'},"I'm a child!"),dom.window.document.body.firstChild);
Observed Behaviour
All server rendering tests are run with JSDOM-environment exposing
document
which isn't available in node during SSR.Expected Current Behaviour
We should run *.spec.server.jsx with separate config file and
testEnvironment: "node"
The text was updated successfully, but these errors were encountered: