Adds require.resolve with tests.