Hi! I’m working on a testing tool and I had a question about kaocha’s focus feature. Given the following test plan:
a
- b
- c
- d
- e
- f
- g
- h
- i
- j
Which of the following test plans does focusing on d
result in? (yes I know it actually uses skip, but setting that aside for a moment)
Option 1
a
- b
- c
- d
Option 2
d
Option 3
a
- b
- c
- d
- f
- i
This is particularly important in the tool I’m working on where branch nodes can contain setup/teardown code that should only run if there are leaves underneath them, i.e. option 1 is what I’m looking forI believe it's option 1, all tests that have a child that is focused are not skipped. But easy enough to verify with --print-test-plan
.
it really has to be, if we would skip a
then it would never get to d
I'm not sure what the difference between 1 and 2 is, since I don't think a, b, or c would contain tests. (But maybe I'm misunderstanding your plans?)
I don't think d 'loses' its context when focusing, though, if that's what you're asking.
I'm searching for re-frame event / component testing strategies. i don't see much prior art out there. "rehook" looks useful but afaict it needs a kaocha adapter. Any advice very welcome.