test: refactor test/es-module/test-esm-resolve-type
#43178
Merged
test/es-module/test-esm-resolve-type
#43178