sfdx-lwc-jest
sfdx-lwc-jest copied to clipboard
Add getRecords stub to uiRecordApi.js
Description
Steps to Reproduce
Execute sfdx-lwc-jest --coverage on an LWC app which uses the getRecords wire adaptor
Expected Results
The getRecords wire adaptor should be stubbed.
Actual Results
Test fails to run with the error TypeError: Invalid adapterId, it must be extensible., due to the inclusion of the getRecords wire adaptor.
Version
@salesforce/sfdx-lwc-jest: 1.1.1
Possible Solution
Add export const getRecords = createLdsTestWireAdapter(jest.fn()); to the uiRecordApi.js file
@Templarian I don't see this adaptor in the uiRecordApi stub.