Skip to content

Commit

Permalink
that's how that test should have been working anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Dec 15, 2023
1 parent bdb636a commit 9979366
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/runtime/test/render-vdom.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1073,12 +1073,15 @@ describe('render-vdom', () => {
@Component({ tag: 'cmp-a' })
class CmpA {
counter = 0;
setRef = () => {
this.counter++;
setRef = (el: HTMLDivElement | null) => {
if (el !== null) {
this.counter++;
}
};
@Prop() state = true;

render() {
console.log('rendering, state:', this.state);
return this.state ? <div ref={this.setRef}>Hello VDOM</div> : <div>Hello VDOM</div>;
}
}
Expand Down

0 comments on commit 9979366

Please sign in to comment.