-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test coverage of responsive <picture> scenarii #93
Comments
@0gust1 using headless browser for testing of Lozad.js is the right way to move forward |
@0gust1 if you can get it working correctly with |
@0gust1 any updates on the test case implementation? |
@ApoorvSaxena Hi ! I have locally a "working" prototype with jest and pupeteer. Sorry, didn't had much time (lot of churn at work+family). Would you accept to remove the pre-commit hook on eslint (and let it for the build, of course) ? |
Also, the choice of puppeteer is questionable, with it, you can't test issues like this one : #99 |
@0gust1 with you want to push "imperfect/incomplete" code just add an |
@thiamsantos thanks, I forgotten that :) @ApoorvSaxena here we go : #101 |
Attempting to make a PR to solve #92, I tried to implement a set of tests for responsive images using
<picture>
tags.It's not that easy, because
js-dom
(used for tests) doesn't replicate the browser behavior of triggering asrc
attribute set in the<img>
tag injected by lozad, according to media queries defined on<source>
elements.I tried using
mq-polyfill
andcanvas
orcanvas-prebuilt
, with no luck so-far.What do you think ?
The text was updated successfully, but these errors were encountered: