hyperfiddle 2025-07-23

What's the best way to test Electric GUI code? Going to use hyperfiddle.rcf. Just poke at DOM with JS interop, and check the results? Or maybe there are some hidden levers generated by Electric, which are more convenient?

Dustin Getz (Hyperfiddle) 2025-07-25T10:37:57.652119Z

i don't understand what problem you're trying to solve

Dustin Getz (Hyperfiddle) 2025-07-25T10:38:06.442409Z

we do not write test assertions against the DOM in the application layer

Dustin Getz (Hyperfiddle) 2025-07-25T10:39:08.766999Z

you can, but, why would you, electric-dom is declarative enough that once you are comfortable with the rules i do not expect this will be a source of bugs that need tests to catch

Yeah, I'm on the fence about testing/not testing mostly declarative code. Just found myself checking things manually, and want to automate that away. Plus if there's changes in electric.forms - tests can catch issues.

Dustin Getz (Hyperfiddle) 2025-07-25T10:55:41.389239Z

electric forms is not mature enough for application layer tests, it is evolving

Dustin Getz (Hyperfiddle) 2025-07-25T10:56:33.536509Z

i recommend you do not attempt to do this

👌 1