You'd have to implement https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define … and everything it depends on — but why do that?
-
-
Replying to @jaffathecake @pemrouz and
Just curious. Working on headless stuff….if you’re testing browser code, why is a headless browser you can control with Node not sufficient?
2 replies 0 retweets 2 likes -
Replying to @ebidel @jaffathecake and
We're currently using for end to end tests. I haven't fully played around with it, but just seems overkill/heavyweight compared to tap et al
1 reply 0 retweets 1 like -
Replying to @pemrouz @jaffathecake and
Ah. It’s meant to be the exact opposite of overkill/heavyweight :) I’m sure the team would love to hear feedback if you have data.
1 reply 0 retweets 0 likes -
Replying to @ebidel @jaffathecake and
That's great to hear :) Currently revisiting and working on component spec, will reach out to you once we get to testing strategy!
1 reply 0 retweets 0 likes -
Kind of worried about having confidence in tests that skip the DOM they’re gonna live in. How can you guarantee anything at that point?
1 reply 0 retweets 3 likes -
Replying to @notwaldorf @ebidel and
Agreed, tests run in both node/browsers in realtime. See popper: https://github.com/pemrouz/popper .
1 reply 0 retweets 0 likes -
Replying to @pemrouz @notwaldorf and
Most people don't do this though, see shallow rendering. Only being able to run in DOM is just another unnecessary hurdle.
1 reply 0 retweets 0 likes -
Replying to @pemrouz @notwaldorf and
If the element is meant to run in the DOM, testing in actual DOM seems to be the only safe thing to do.
1 reply 0 retweets 4 likes -
Replying to @justinfagnani @pemrouz and
Unit testing React components in non-DOM env is a great way to test logic fast. End-to-end browser tests also important, but perf matters
1 reply 0 retweets 1 like
Uhhhhhhhh...how slow is headless chrome on your box, exactly?
-
-
-
Replying to @dfabu @slightlylate and
There's https://github.com/tmpvar/jsdom - you just need to be aware you're essentially testing in a different agent.
2 replies 0 retweets 1 like - 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.