While testing LWC in VSCode using jest script, unable to render custom LWC component, it throws an error- Unknown public property "smalldevicesize" of element . This is likely a typo on the corresponding attribute "smalldevicesize".
Asked
Active
Viewed 831 times
2 Answers
3
You are using a wrong attribute name smalldevicesize this should be small-device-size
Here is an example:
<lightning-layout-item small-device-size="">
Here is the Lightning Web Component documentation. I hope this should work.

Rahul Kumar
- 469
- 5
- 10
-
1Thanks it worked for me, I was srucked from long time – Shailendra Modi Oct 05 '19 at 05:58
-
This solution worked for me while testing LWC custom component using jest testing framework. – Shailendra Modi Oct 07 '19 at 06:42
1
change the attribute to because it supports to kebab notation.

Manmeet Kaur
- 39
- 8
-
Yes, jest UI support kebab notation for HTML template & jest.js supports camel notation for javascipt. – Shailendra Modi Oct 07 '19 at 06:25