netsuite-suitecloud-sdk
netsuite-suitecloud-sdk copied to clipboard
unit testing fails when `define` has been proxied/ abstracted, etc
Your environment
OS : macOS 12 Node.js version : 16.13.2 suitecloud-cli version : 1.3.1 Terminal/CMD tool : iTerm
Describe the bug
unit testing module does not support a customized define
To Reproduce
Steps to reproduce the behavior:
- create a module like this:
const x = define;
x([], ()=>{
});
- test with suitecloud
Actual Behavior
ReferenceError: define is not defined
Expected Behavior
that should work. While this is a contrived example it's based on something real. we have define
conditionally wrapped in node because we were doing unit testing in the past (before suitecloud solution) came along and needed a way to test them
Additional context
how are you executing this if define
does not exist?
i opened this issue for you guys. Can you try it? or how can i try it with your package?
Hi @gillyspy , Thanks for reporting this. We will investigate this when we can and get back to you.