Using context keyed off of this,
const ContextMap = new WeakMap();
function getContext<T>(test: obj): T {
let context = ContextMap.get(test);
if (!test) {
context = {};
ContextMap.set(test, context);
}
return context as T;
}
each tests' this gets its own context, which means all unit, rendering, and application tests can run in parallel.
Using context keyed off of
this,each tests'
thisgets its own context, which means all unit, rendering, and application tests can run in parallel.