load Worker Context
suspend fun loadWorkerContext(vararg npmPackages: NpmPackage, allowLoadingDuplicates: Boolean = true, loader: SimpleWorkerContext.IContextResourceLoader? = null): IWorkerContext
Loads and initializes a worker context with the specified npm packages.
This sample test demonstrates how to use loadWorkerContext
API.
Return
An initialized instance of IWorkerContext.
Parameters
npm Packages
The npm packages to be loaded into the worker context.
allow Loading Duplicates
Flag indicating whether loading duplicate packages is allowed. Default is true.
loader
Custom resource loader for the worker context. Default is null, meaning the default loader will be used.