During test runs of your hook, you might not want to call live API endpoints but development endpoints instead.
Your hook code can now detect whether it's called in live or test mode.
You can use the isTestMode property of the hook's context to distinguish between run modes.
Here is an example about using a different API endpoint depending on the run mode: