NSOA.context.isTestMode()
Use this function to determine if the script is being run in test mode.
For more information see Testing and Debugging.
Parameters
-
(none)
Returns
-
Boolean true if the script is running in test mode and false otherwise.
Units Limit
-
0 units
For more information, see Scripting Governance.
Since
-
November 16, 2013
Example
-
This example shows some code that only runs in “Test mode”, for example an assertion.
if(NSOA.context.isTestMode() && someVar==null) throw new Error("someVar should never be null");