localvoid / ivi

Lighweight Embeddable Web UI Library
MIT License
724 stars 22 forks source link

correctness tests #46

Closed leeoniya closed 1 year ago

leeoniya commented 1 year ago

i don't see any real end-to-end tests for correctness which would have caught https://github.com/localvoid/ivi/pull/45.

this makes me somewhat hesitant to experiment with porting my domvm demos to ivi for a more representative pain assessment for my use cases.

would be great to see some tests that make refactoring/iteration less scary, and regressions / behavior changes intentional.

you should be able to port many of domvm's tests and LIS fuzzing verbatim, including my DOM instrumentor.

localvoid commented 1 year ago

Yes, ivi 1.0 had a good test coverage that also counted every DOM operation. I wanted to bring back tests without introducing a lot of external dependencies like Jest, etc. I'll add tests when I finish refactoring for SSR/Hydration.

leeoniya commented 1 year ago

neither of these is small, but both much faster than jsdom:

https://github.com/WebReflection/linkedom https://github.com/capricorn86/happy-dom

domvm uses https://github.com/developit/undom for headless testing (which i've contributed a couple fixes to). might be worth just extending that with only what ivi needs.