NX-507: Factored out mock NPM registry, simplified tests