New answers tagged lwc-jest
1
vote
getPicklistValues jest test
If you will try to console.log config in emit(), you will see following:
{
fieldApiName: {
objectApiName: 'SomeObject',
fieldApiName: 'SomeApiName'
},
recordTypeId: 'xxxxxxxxxxxxxxxxxx'
}...
0
votes
My LWC test is not displaying code coverage
I encountered a similar problem and was able to resolve it successfully by implementing the following jest.config.js:
const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config');
const ...
Top 50 recent answers are included
Related Tags
lwc-jest × 179lightning-web-components × 161
unit-test × 39
javascript × 20
mock × 12
salesforcedx × 10
code-coverage × 9
lwc-wire-adapter × 9
lwc-dom × 8
lightning × 7
toast × 5
wire × 4
lightning-datatable × 3
vs-code × 3
apex × 2
lightning-aura-components × 2
api × 2
event × 2
jsforce × 2
dom × 2
js × 2
imperativeapex × 2
lightning-experience × 1
visual-workflow × 1
custom-object × 1