Closed p3v9d5ui closed 5 months ago
Execute sfdx-lwc-jest --coverage on an LWC app which uses the getRecords wire adaptor
sfdx-lwc-jest --coverage
getRecords
The getRecords wire adaptor should be stubbed.
Test fails to run with the error TypeError: Invalid adapterId, it must be extensible., due to the inclusion of the getRecords wire adaptor.
TypeError: Invalid adapterId, it must be extensible.
@salesforce/sfdx-lwc-jest: 1.1.1
Possible Solution
Add export const getRecords = createLdsTestWireAdapter(jest.fn()); to the uiRecordApi.js file
export const getRecords = createLdsTestWireAdapter(jest.fn());
uiRecordApi.js
@Templarian I don't see this adaptor in the uiRecordApi stub.
uiRecordApi
@ekashida I guess that you can close this issue now :)
Description
Steps to Reproduce
Execute
sfdx-lwc-jest --coverage
on an LWC app which uses thegetRecords
wire adaptorExpected 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 thegetRecords
wire adaptor.Version
@salesforce/sfdx-lwc-jest: 1.1.1
Possible Solution
Add
export const getRecords = createLdsTestWireAdapter(jest.fn());
to theuiRecordApi.js
file