erictgrubaugh
11/22/2022, 2:19 AMN/runtime.accountId
. During my unit tests for the first module, I want to vary the return value of runtime.accountId
. How would I go about that?dbarnett
11/22/2022, 1:45 PMmockReturnValueOnce
https://jestjs.io/docs/mock-function-api#mockfnmockreturnvalueoncevalue
possibly in combination with jest.spyOn
there you can setup various values when called nth timesdarrenhillconsulting
11/22/2022, 4:10 PMdbarnett
11/22/2022, 4:12 PMruntime
etc., before remaking your own)
https://github.com/oracle/netsuite-suitecloud-sdk/pull/644erictgrubaugh
11/22/2022, 4:29 PMerictgrubaugh
11/22/2022, 4:40 PMShawn Talbert
11/22/2022, 4:45 PMWatz
11/28/2022, 4:24 PMShawn Talbert
11/28/2022, 5:30 PMWatz
11/28/2022, 5:31 PMShawn Talbert
11/28/2022, 5:32 PMerictgrubaugh
02/02/2023, 3:28 PMsuitecloud-unit-testing-stubs
module; I've put the latter through its paces at work and it gets even easier with that in place