more robust test infrastructure for mocking registry added to search. Also added npm search test cases to check the cache creation