Closed
Description
Hello,
Is there a way to render a component, set the test conditions and then call something like expect(RenderedComponent).toRenderSnippet(...)
or .not.toRenderSnippet(...)
?
For example
it('should render the snippet if conditions are met', async () => {
// this would be a new functions that auto-fills the children/props that are Snippet for example
const {renderedComponent} = renderWithMockedSnippets(MyComponent);
// here the consumer sets the conditions to render the snippet (if it is conditional)
........
expect(renderedComponent).toHaveSnippet(...)
})