I get this error:
Cannot find module 'lightning/quickActionPanel'
when running this Jest test:
import { createElement } from 'lwc';
import DuplicateScreenAction from 'c/duplicateScreenAction';
let componentElement = null;
describe('DuplicateScreenAction', () => {
beforeEach(() => {
componentElement = createElement('c-duplicateScreenAction', {
is: DuplicateScreenAction
});
});
afterEach(() => {
while (document.body.firstChild) {
document.body.removeChild(document.body.firstChild);
}
});
it('component created', () => {
document.body.appendChild(componentElement);
expect(componentElement).not.toBe(null);
});
});
where the duplicateScreenAction
custom LWC HTML includes lightning-quick-action-panel which is documented as beta. The component works fine in the product desktop. Other Jest tests work fine.
Am I missing something here e.g. are beta components excluded from LWC Jest?
I have run sfdx update
and npm update
.
PS
I get a similar error for this:
import { CloseActionScreenEvent } from 'lightning/actions';
Background info here Create Screen Quick Actions.