I am mocking custom permission successfully like this:
jest.mock(
"@salesforce/customPermission/my-custom-permission",
() => {
return {
default: true
};
},
{ virtual: true }
);
In another test of the same component I would like to change return value of this mock or clear only this mock. I have tried to mockReturnValue
, mockImplementation
and everything I could find from the documentations. Does anyone have an idea how this could be solved?
Thanks!!