lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Improve test coverage for vdom diffing after static vnode optimization

Open nolanlawson opened this issue 3 years ago • 3 comments

As noted in https://github.com/salesforce/lwc/pull/2781#discussion_r851122249, our test coverage will decrease due to the static vnode optimization. Ideally we should add new tests to cover those vdom diffing cases that are no longer covered.

nolanlawson avatar May 02 '22 21:05 nolanlawson

This issue has been linked to a new work item: W-11087131

uip-robot-zz avatar May 02 '22 21:05 uip-robot-zz

One source of the drop in coverage is validateClassAttr and validateStyleAttr. Because the styleDecls and classMap are based on static content, there are many fewer of these now.

nolanlawson avatar Jul 27 '22 22:07 nolanlawson

We could probably get rid of styleDecls and classMap entirely, but it is still used in the ACT compiler, so there's that to consider.

Other places it shows up are in nodes that aren't supported for static fragments, such as <custom-element>.

nolanlawson avatar Jul 27 '22 23:07 nolanlawson