From 32866f835de649098d3cebba70bec6ea3c162ed8 Mon Sep 17 00:00:00 2001 From: Philippe Ozil Date: Wed, 9 Aug 2023 14:15:08 +0200 Subject: [PATCH] feat: shortened function body --- .../__tests__/apexImperativeMethod.test.js | 8 +++----- .../apexImperativeMethodWithComplexParams.test.js | 8 +++----- .../__tests__/apexImperativeMethodWithParams.test.js | 8 +++----- .../__tests__/compositionContactSearch.test.js | 8 +++----- 4 files changed, 12 insertions(+), 20 deletions(-) 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 } );