Description
As far as I can tell, just passing in a variable into the render function doesn't enable two way data binding. Despite being an anti-pattern, two-way data binding is actually useful in a lot of cases, so it would be nice if there was a way to ensure that it works.
Edit:
I suppose you could also do something like
const utils = render(Input, { value: "" });
const component = utils.component.$$;
/*
* Update component such that value = asdf
*/
expect(component.ctx[component.props["value"]]).toBe("asdf")
But it's a bit repetitive and there's probably at least some justification in putting in a helper function into the library (since the framework supports it after all)
Metadata
Metadata
Assignees
Labels
No labels