Create a new root job (usually for testing purposes). If there is an existing
root job, it is ended first. The new root is configured to convert async
errors into unhandled promise rejections by default, so if you need to change
that you can use its .asyncCatch() method.
If your project customizes the root job in some way(s), you will
probably want a function to do that, so you can use it both in tests and at
runtime. (e.g. myInit(newJob()) in tests, and myInit(root) at runtime.)
Create a new root job (usually for testing purposes). If there is an existing root job, it is ended first. The new root is configured to convert async errors into unhandled promise rejections by default, so if you need to change that you can use its
.asyncCatch()
method.