test: refactor `test-esm-loader-hooks` for easier debugging
- Always check stderr before stdout as the former would contain error information.
- Always match the full stdout to avoid surprises.
- Use
deepStrictEqual
when appropriate to get more informative test failures. - Remove leading slashes from relative paths/URLs to not confuse them with absolute paths.
- Remove unnecessary
--no-warnings
flag.