screnshaw
10/04/2022, 12:39 PMdbarnett
10/04/2022, 2:02 PMscrenshaw
10/04/2022, 2:06 PMdbarnett
10/04/2022, 2:15 PMdbarnett
10/04/2022, 2:17 PMscrenshaw
10/04/2022, 2:17 PMdbarnett
10/04/2022, 2:20 PMscrenshaw
10/04/2022, 2:22 PMdbarnett
10/04/2022, 2:24 PMscrenshaw
10/04/2022, 2:25 PMscrenshaw
10/04/2022, 2:25 PMscrenshaw
10/04/2022, 2:28 PMimport * as searchHelper from '../../../../../src/FileCabinet/SuiteScripts/AccentDecor/Libs/HelperClasses/searchHelper'
jest.mock('searchHelper');
import allocationHelper from '../../../../../src/FileCabinet/SuiteScripts/AccentDecor/implementation/Order to Cash/Allocations/ad_bl_set_allocation_strategy.js';
Cannot find module 'searchHelper'
dbarnett
10/04/2022, 2:30 PMjest.mock
, requires to put the full relative path there as well for one thingscrenshaw
10/04/2022, 2:31 PMdbarnett
10/04/2022, 2:34 PMSuiteCloudJestConfiguration.build
as a variable and inspect , if you look at the moduleNameMapper
property there should be one that is like "SuiteScripts" just to check that matches your corresponding src location
I'm not sure what else might be the issue though 😅screnshaw
10/04/2022, 4:04 PMdbarnett
10/04/2022, 4:16 PMgenerate
method here https://github.com/oracle/netsuite-suitecloud-sdk/blob/master/packages/unit-testing/jest-configuration/SuiteCloudJestConfiguration.js , without additional global/config with regard to your custom amd modules within src/SuiteScripts specifically
but hey if it is all working now together then great! :)screnshaw
10/06/2022, 6:39 PMdbarnett
10/06/2022, 7:27 PMscrenshaw
10/06/2022, 7:29 PMscrenshaw
10/06/2022, 7:31 PM