screnshaw
03/11/2022, 7:29 PMnetsuite-suitecloud-sdk
and I am running into an issue when unit testing that it can't find N/log. Has anyone encountered this and figured out a way to get around it?dbarnett
03/11/2022, 7:51 PMsetupFiles
property in jest.config.js
https://jestjs.io/docs/configuration#setupfiles-arrayscrenshaw
03/11/2022, 7:51 PMdbarnett
03/11/2022, 7:56 PMglobal.log = {
debug : (options) => null,
audit : (options) => null,
emergency : (options) => null,
error : (options) => null,
};
if that is what you mean, I did similarly with util & other globally available NS module methods so that they were available to jest (probably could be done better with some variation of mocks instead, though this was just how I setup at the time to get around)screnshaw
03/11/2022, 7:57 PMdbarnett
03/11/2022, 8:03 PM