diff --git a/force-app/main/default/lwc/apexImperativeMethod/__tests__/apexImperativeMethod.test.js b/force-app/main/default/lwc/apexImperativeMethod/__tests__/apexImperativeMethod.test.js index dc36cc3de..191953868 100644 --- a/force-app/main/default/lwc/apexImperativeMethod/__tests__/apexImperativeMethod.test.js +++ b/force-app/main/default/lwc/apexImperativeMethod/__tests__/apexImperativeMethod.test.js @@ -5,11 +5,9 @@ import getContactList from '@salesforce/apex/ContactController.getContactList'; // Mocking imperative Apex method call jest.mock( '@salesforce/apex/ContactController.getContactList', - () => { - return { - default: jest.fn() - }; - }, + () => ({ + default: jest.fn() + }), { virtual: true } ); diff --git a/force-app/main/default/lwc/apexImperativeMethodWithComplexParams/__tests__/apexImperativeMethodWithComplexParams.test.js b/force-app/main/default/lwc/apexImperativeMethodWithComplexParams/__tests__/apexImperativeMethodWithComplexParams.test.js index f99678826..3795fd275 100644 --- a/force-app/main/default/lwc/apexImperativeMethodWithComplexParams/__tests__/apexImperativeMethodWithComplexParams.test.js +++ b/force-app/main/default/lwc/apexImperativeMethodWithComplexParams/__tests__/apexImperativeMethodWithComplexParams.test.js @@ -5,11 +5,9 @@ import checkApexTypes from '@salesforce/apex/ApexTypesController.checkApexTypes' // Mocking imperative Apex method call jest.mock( '@salesforce/apex/ApexTypesController.checkApexTypes', - () => { - return { - default: jest.fn() - }; - }, + () => ({ + default: jest.fn() + }), { virtual: true } ); diff --git a/force-app/main/default/lwc/apexImperativeMethodWithParams/__tests__/apexImperativeMethodWithParams.test.js b/force-app/main/default/lwc/apexImperativeMethodWithParams/__tests__/apexImperativeMethodWithParams.test.js index a7e4f5703..88360817f 100644 --- a/force-app/main/default/lwc/apexImperativeMethodWithParams/__tests__/apexImperativeMethodWithParams.test.js +++ b/force-app/main/default/lwc/apexImperativeMethodWithParams/__tests__/apexImperativeMethodWithParams.test.js @@ -5,11 +5,9 @@ import findContacts from '@salesforce/apex/ContactController.findContacts'; // Mocking imperative Apex method call jest.mock( '@salesforce/apex/ContactController.findContacts', - () => { - return { - default: jest.fn() - }; - }, + () => ({ + default: jest.fn() + }), { virtual: true } ); diff --git a/force-app/main/default/lwc/compositionContactSearch/__tests__/compositionContactSearch.test.js b/force-app/main/default/lwc/compositionContactSearch/__tests__/compositionContactSearch.test.js index 7f4aa7765..33bab771e 100644 --- a/force-app/main/default/lwc/compositionContactSearch/__tests__/compositionContactSearch.test.js +++ b/force-app/main/default/lwc/compositionContactSearch/__tests__/compositionContactSearch.test.js @@ -5,11 +5,9 @@ import findContacts from '@salesforce/apex/ContactController.findContacts'; // Mocking imperative Apex method call jest.mock( '@salesforce/apex/ContactController.findContacts', - () => { - return { - default: jest.fn() - }; - }, + () => ({ + default: jest.fn() + }), { virtual: true } );