esm: improve fetch_module test coverage and remove hack
#41947
Merged
fetch_module test coverage and remove hack
#41947