Skip to content

manage context for filter in the testMachine, not the machine under test? #1

Description

@dr-skot

Hey,

First of all, thank you for this repository & the videos. I don't know how else I would have figured out how to approach this at all.

It seems like in all your examples you have a testMachine whose definition is a duplicate of the machine under test, but expanded to add the counters that limit looping. So the success of your tests, as the machine grows more complicated, partly depends on your success at keeping these definitions in sync with each other.

Is there some way to derive the test machine from the machine under test, and then add the counters, so we don't have to keep them synced manually? And I'm assuming manually means: cut new machine code, paste into test file, re-interleave counter logic—or am I wrong?

I'm asking because you take such pains to separate the meta.test expect() code from the machine definition, and I wondered if you had any ideas for separating out the counter stuff, which after all is also test-only code.

Thanks for any insights you might have.
Scott

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions