Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const testStateMachine = (Component, options = {}) => {
const paths = getShortestPaths(Component.machine, options.extendedState)
Object.keys(paths).forEach(key => {
const initialData = idx(options, _ => _.fixtures.initialData)
const renderer = TestRenderer.create(
)
const instance = renderer.getInstance()
paths[key].forEach(({ event, state }) => {
const fixtures = idx(options, _ => _.fixtures[state][event])
instance.handleTransition(event, fixtures)
})
const machineState =
instance.state.machineState.toString() ||