Enhancement
Currently their is no canonical way to mock @dojo/shim modules. This is a little annoying when wanting to mock things such as fetch and requires messing with the global.
Perhaps inside our shim modules we can have a wrapper that wraps the shim itself and when a test has flag is enabled provides an additional export that allows you to mutate it.
For example something like:
import fetch, { replace } from '@dojo/framework/shim/fetch'
replace(myMockFetch);
where replace (not attached to the name), is only available with the test has flag. This would allow you to swap the implementation.