Currently mocked packages are:
underscore at 1.3.1, 1.3.3 and 1.5.1 while version 1.5.1 is the latest in this mocked registry.
request at 0.9.0, 0.9.5 and 2.27.0 while version 2.27.0 is the latest in this mocked registry.
test-package-with-one-dep at 0.0.0, with mocked dependency
npm-test-peer-deps at 0.0.0, with a peer dependency on
email@example.com and a dependency on
test-repo-url-http at 0.0.0
test-repo-url-https at 0.0.1
test-repo-url-ssh at 0.0.1
mkdirp at 0.3.5
optimist at 0.6.0
clean at 2.1.6
async at 0.2.9, 0.2.10
checker at 0.5.1, 0.5.2
Installing underscore 1.3.1:
var mr =
Defining custom mock routes:
var mr =var customMocks ="get":"/mypackage": 500 "ente" : true
Limit the requests for each route:
Although ideally we stick with the packages already mocked when writing new tests, in some cases it can be necessary to recreate a certain pathological or unusual scenario in the mock registry. In that case you can run
$ ./add-fixture.sh my-weird-package 1.2.3
to add that package to the fixtures directory.
err, servernow, instead of just server (https://github.com/npm/npm-registry-mock/issues/20)