#npm-registry-mock
##Usage
Currently mocked packages are underscore
at 1.3.1 and 1.5.1 while version 1.5.1 is the latest in this mocked registry.
Installing underscore 1.3.1:
var mr = require("npm-registry-mock")
mr(1331, function (s) {
npm.load({registry: "http://localhost:1331"}, function () {
npm.commands.install("/tmp", "underscore@1.3.1", function (err) {
s.close()
})
})
})
Defining custom mock routes:
var mr = require("npm-registry-mock")
var customMocks = {
"get": {
"/mypackage": [500, {"ente" : true}]
}
}
mr({port: 1331, mocks: customMocks}, function (s) {
npm.load({registry: "http://localhost:1331"}, function () {
npm.commands.install("/tmp", "mypackage", function (err) {
s.close()
})
})
})
##Todo