Do you mean you want to test NetSuite functionalit...
# suitescript
s
Do you mean you want to test NetSuite functionality via scripts, or test your code using a JavaScript testing framework? I generally use scheduled scripts when I want to test functionality and customizations, creating a series of test functions:
function testSalesOrderCustomGLImpact()
,
function testCashSaleCustomGLImpact()
, etc. and then call them from the main scheduled script function. For unit testing script code, I have used Jest and Mocha, but run the tests externally (not in NetSuite) on a CI server and on my development machine using Node.
s
I mean unit testing script code
s
Ah, yes. The best way I have found is to set up a Node project with Jest, and write your code un such a way that you can test certain functions or module without having a dependency on Netsuite functionality, or you can mock the SuiteScript calls.
s
Ok Ok Thanks @scottvonduhn