I'm trying to write a jest test for lwc component, and facing an issue with rendering . For example, if we add the condition like this
<template if:true={booleanFlagValue}>
<lightning-button
label="Test">
<lightning-button>
</template>
or
<template>
<lightning-button
label="Test"
if:true={booleanFlagValue}>
</lightning-button>
</template>
lightning-button will not rendered. The condition return true, and if I try to replace lightning-button with text, the text will displayed. I'm also tried something like this
<template if:true={booleanFlagValue}>
{testTextValue}
<lightning-button
label="Test">
</lightning-button>
<template>
and the testTextValue displayed but lightning-button was not rendered. Maybe someone faced this issue too and you have an idea how to resolve it?