I have created an LWC app, and am now trying to add code test coverage. But unfortunately, Jest (@salesforce/[email protected]) is failing in two different ways:
- I use the
getRecords
wire adapter, which I think was added fairly recently (we're using api version 55). But Jest throws this error:
TypeError: Invalid adapterId, it must be extensible.
The other wire adapters, such as getRecord
, are fine. Only the inclusion of this adapter causes this problem.
- The
uiRelatedListApi
andLightningConfirm
libraries result in errors like this:
Cannot find module 'lightning/uiRelatedListApi' from '<snip>'
No other lightning/*
module causes this problem.
Any ideas what is causing this?
One thing I have noticed is that my project (derived from a recipe project), includes a Typescript type declaration file called lds.d.ts, and each of the types above which are causing problems do not exist in this file. The others, which are working fine, do exist.