Add unit tests for require() handler