Run a stateful test: apply randomly chosen rules of machine to state,
checking its invariants along the way, as described in the module
documentation. Call it inside a test body; the initial state is
constructed there, so every test case starts afresh.
Rules and invariants must be synchronous — one that returns a Promise
fails the test with a TypeError. Use runAsync (inside
testAsync) for asynchronous machines.
Throws an Error if machine has no rules or options.stepCount is below 1.
Run a stateful test: apply randomly chosen rules of
machinetostate, checking its invariants along the way, as described in the module documentation. Call it inside a test body; the initialstateis constructed there, so every test case starts afresh.Rules and invariants must be synchronous — one that returns a
Promisefails the test with aTypeError. Use runAsync (inside testAsync) for asynchronous machines.Throws an
Errorifmachinehas no rules oroptions.stepCountis below 1.