How to check if code is running in test mode (unit...
# javascript
p
How to check if code is running in test mode (unit test)?
e
I don't think there a "native" way to do it. But you can insert a compile time constant, different depending on the compilation mode.
p
Thought may be there is possibility for example register some window/document property before run test and check for it in code.
e