vecty icon indicating copy to clipboard operation
vecty copied to clipboard

determine how best to perform testing

Open emidoots opened this issue 9 years ago • 7 comments

as it requires a browser DOM to be present, etc.

emidoots avatar Feb 13 '16 21:02 emidoots

I would definitely like to see the testing approach that you guys will take, currently once can only test non DOM based code. Would be nice to get such level of tests for the visual end and dom based functions as well.

influx6 avatar Feb 15 '16 11:02 influx6

I'd like to have something like React's shallow rendering, see https://facebook.github.io/react/docs/test-utils.html#shallow-rendering. Such testing is easy to reason about, tests only one component at a time, requires no DOM and thus might even run with gc.

neelance avatar Feb 15 '16 12:02 neelance

That sounds great @neelance ! I like the idea of that a lot :) I will see if I can find time to look into it.

emidoots avatar Feb 21 '16 07:02 emidoots

I also think that component based testing is the way to initially go. They are unit tests of that unit / component.

joeblew99 avatar Apr 12 '16 19:04 joeblew99

@slimsag I'm struggling a little bit trying to determine the best way to test more complex element hierarchies. I feel like maybe we need a higher-order wrapper for the mockObject, but I'm not entirely sure of the best way to track element identity, to test for correct order, etc - ideally I'd like to sort this out in a way that allows table-driven testing for maintenance.

pdf avatar Jun 30 '17 11:06 pdf

I'm pretty much blocked on doing any further work until we either decide what to do about #115, or work out how to go about testing trees of elements.

pdf avatar Jul 08 '17 22:07 pdf

Sorry I haven't had a chance to look at this yet @pdf -- I think we just need to add some more extensive helper utility functions to our test suite but I haven't had time to figure out which are needed / write them. I'll gladly accept idea's/PRs in this area if anyone wants to beat me to it.

I've responded on #115 and think we can find a solution there very soon (perhaps today)

emidoots avatar Jul 08 '17 23:07 emidoots