Closed simon-nowak closed 1 year ago
Any resolution for this? This is blocking me as well.
@Templarian looks like this stub is generated for core but not for platform.
@ekashida Are there any updates for this? I've updated to 1.1.2
and I'm still getting the same error
Hi, I'm also getting the same error. Is there already a fix on this? I used the 1.1.3
version. Thank you.
I created a mock for this as: force-app/test/jest-mocks/lightning/uiRelatedListApi.js
, which contains:
import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util';
export const getRelatedListRecords = createLdsTestWireAdapter(jest.fn());
I created a mock for this as:
force-app/test/jest-mocks/lightning/uiRelatedListApi.js
, which contains:import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; export const getRelatedListRecords = createLdsTestWireAdapter(jest.fn());
thanks @p3v9d5ui , it worked!!!
Description
Hello here,
I’m working on a LWC component that use the “getRelatedListRecords” from uiRelatedListApi. It’s working fine on my orgs. This UI API has been introduced with the salesforce v54.
My problem is about the JEST unit test. The error message is about the “getRelatedListRecords”. This module cannot be found.
I have the last version of “@ salesforce/sfdx-lwc-jest”: “^1.1.0" If I understand well this version is running the v53.
I took a look at the package documentation and found a reference to “prerelease”. But I don’t find any “prerelease” anywhere. And the “last” version is still the 1.1.0.
Does anyone know what are my solutions/workarounds here?
Steps to Reproduce
Expected Results
Runing the test.
Instead I have thoses errors (see more in screenshot)
error Invalid sourceApiVersion found in sfdx-project.json. Expected 53.0, found 55.0 Cannot find module 'lightning/uiRelatedListApi' from 'tradespeople-approval-acquisition/main/default/lwc/xxxx/xxxx.js'
Version
Additional context/Screenshots