2 ms·
100% this is the model we follow. no dom in tests helps a lot. the cypress docs don’t make any sense here
by foolfoolz 6y ago
100% this is the model we follow. no dom in tests helps a lot. the cypress docs don’t make any sense here
- veidr 6y agoYeah, "no DOM in tests" is actually a pretty good mantra. Code that is just inspecting the DOM to find elements, or to do stuff to them that is just working up to the state where you can actually test something, should be in some shared object/library, but that is as easy as: import { Whatever } from '/foo/bar'; Having that kind of code outside of the test probably makes the introductory "test hello world" example more complicated, but I think it's definitely a good practice in the real world, and isn't documented well.