What does everyone use to validate their scripts? ...
# suitescript
g
What does everyone use to validate their scripts? currently, working on a UE and WF action script and wanted to know how can I validate these without trying to upload in NS?
s
You can’t actually test/validate how the SuiteScript api calls will work without actually running that code in NS, but you can unit test any business logic you have using Jest or other testing frameworks. Also, using a linter like ESLint will catch a lot of typos and common errors. In my experience the majority of bugs are simply mistyped variable names, mismatched braces, etc. If you have a sandbox (hopefully yes) you can run your code there to test it in a non-production environment, so at least if there is a mistake, it won’t harm anything. You can also use the suitescript debugger, and step through the code inspecting variables.
🙌 2